JavaScript help needed.
Oct 28, 2013
Hi,
What I am trying to do is send out some variables to be tracked in a database using the POST command. I have modified some code I found on the forums and wanted to get some feedback.
Any help would be greatly appreciated.
var p = GetPlayer();
var email = p.GetVar("email")
var firstname = p.GetVar("firstname")
var lastname = p.GetVar("lastname")
var country = p.GetVar("country")
var courseid = p.GetVar("courseid")
var division = p.GetVar("division")
var sHTML = "";
sHTML += "<form id='formScore' method='post' action=' http://URLGoesHere>";
sHTML += "<input type='hidden' id='USER_EMAIL' name='USER_EMAIL' value= " + email + ">";
sHTML += "<input type='hidden' id='FIRST_NAME' name='FIRST_NAME' value= " + firstname + ">";
sHTML += "<input type='hidden' id='LAST_NAME' name='LAST_NAME' value= " + lastname + ">";
sHTML += "<input type='hidden' id='COUNTRY' name='COUNTRY' value= " + country + ">";
sHTML += "<input type='hidden' id='COURSE_ID' name='COURSE_ID' value= " + courseid + ">";
sHTML += "<input type='hidden' id='DIVISION' name='DIVISION' value= " + division + ">";
sHTML += "<br><input type='submit'><br>";
sHTML += "</form>";
document.getElementById("divEmail").innerHTML = sHTML;
document.getElementById("formScore").submit();
3 Replies
Anyone?
Anyone
Hi Stephen! JavaScript is out of my realm of expertise and level of support, but I'm hoping that someone in the community will be able to assist you
This discussion is closed. You can start a new discussion or contact Articulate Support.