passing Javascript variables?

May 15, 2013

While our nonprofit prepares to invest in an LMS (2014?), we're hoping to push quiz results to a small database using Javascript.

I can get it to open a page hosted on our server with this:

window.open('http://10.xxx.xxx.xxx/online-training/added.php');

But the script passing variables breaks down:

var player=GetPlayer();

var first=player.GetVar("FirstName");

var last=player.GetVar("LastName");

var empno=player.GetVar("EmployeeID");

var course=player.GetVar("CourseName");

var score=player.GetVar("Results.ScorePercent");

var hours=player.GetVar("Hours");

window.open('http://10.xxx.xxx.xxx/online-training/added.php?first='+first+'&last='+last+'&empno='+empno+'&course='+course+'&score='+score+'&hours='+hours, '_top');

Never Java'd before. Any ideas what I'm doing wrong?

1 Reply
M B

I always wondered what a week's worth of crickets sounded like...

Anyway, solved my own problem. It appears Results.ScorePercent can't be passed. Turns out that's what was messing up the whole script. I'm looking now for a workaround that allows me to pass the user's score.... until our nonprofit can afford an LMS.

This discussion is closed. You can start a new discussion or contact Articulate Support.