Sending variables out to a URL using the post request.
Aug 22, 2013
I’m working on a project and need to send out some variables that have been captured within the course out to an external URL . The client has a tracking system that will accept the information using a post request to a URL, the example below was provided:
var sHTML = "";
sHTML += "<form id='formScore' method='post' action='http://p2.hawaiiantel.com/hr/Storyline/SL_Login2.asp'>";
sHTML += "<input type='hidden' id='Title' name='Title' value= " + title + ">";
sHTML += "<input type='hidden' id='Result' name='Result' value= " + resultstatus + ">";
sHTML += "<input type='hidden' id='ScorePctg' name='ScorePctg' value= " + scorepctg + ">";
sHTML += "<input type='hidden' id='ScorePoints' name='ScorePoints' value= " + scorepoints + ">";
sHTML += "<input type='hidden' id='PassingPctg' name='PassingPctg' value= " + passingpctg + ">";
sHTML += "<input type='hidden' id='PassingPoints' name='PassingPoints' value= " + passingpoints + ">";
sHTML += "<br><input type='submit'><br>";
sHTML += "<form>";
document.getElementById("divEmail").innerHTML = sHTML;
Any help will be very much appreciated.