PDA

View Full Version : HTML coding from a Flash generated file



Bruman
04-16-2007, 05:52 PM
Good day everyone.

I have a Flash-generated HTML file (generated from Adobe Captivate 2 software) that essentially takes survey information that was originally set to send the survey information to email.

I have modified the HTML file to send the survey results to a SQL database (can be sent to Access database also). Essentially the email results would be stripped of the double quotes and only the raw data sent to the database. The coding works to send a single result (like say a test data), but I need to send the survey information that has multple results to the database, and I am having trouble getting the survey recognized and sent.

The survey results are formated(for email) like this,...
"Date","Time","Interaction ID","Objective ID","Interaction Type","Correct Response","Student Response","Result","Weight","Latency"
"04/16/2007","09:17:58","Interaction10153","Quiz10030","choice","","D","C","0","00:00:08"
"04/16/2007","09:18:01","Interaction10312","Quiz10030","choice","","B","C","0","00:00:02"
"04/16/2007","09:18:04","Interaction10355","Quiz10030","choice","","A","C","0","00:00:02"
"04/16/2007","09:18:07","Interaction10396","Quiz10030","choice","","C","C","0","00:00:02"
"04/16/2007","09:18:09","Interaction10441","Quiz10030","choice","","C","C","0","00:00:02"
"04/16/2007","09:18:12","Interaction10486","Quiz10030","choice","","B","C","0","00:00:02"
"04/16/2007","09:18:15","Interaction10531","Quiz10030","choice","","A","C","0","00:00:02"
----------------------------------------

I am using an array to get single results like this.
// strip the word Interaction Data out of the results
var stripInteractionData = gstrEmailBody.replace("Interaction Data", "");
// remove the double quotes
var stripQuotes = stripInteractionData;
while(stripQuotes.indexOf("\"") !=-1){
stripQuotes=stripQuotes.replace("\"", "");
}
// turn results into an array to access single items
var results_array = stripQuotes.split(",");

// assign variables
var InteractionID = results_array[21];
var ObjectiveID = results_array[22];
var InteractionType = results_array[23];
var StudentResponse = results_array[25];

where the numbers in the array represents the position of the values needed.

E.g. Interaction10153 | Quiz10030 |choice | D

Can anyone tell me how to modify the code so as to to get the multiple values (columns/rows)?

Thanks in advance.
Bruman