Dear everyone,
After sending Agnès an e-mail about mini-player, I've tried creating a jmatch exercise. However the function sending of results doesn't work any longer.
I used to have this in my jmatch .htm files
//CODE FOR HANDLING SENDING OF RESULTS
var UserName = '';
var StartTime = (new Date()).toLocaleString();
var ResultForm = '<html><body><form name="Results" action="../../traitement.php" method="post" enctype="x-www-form-encoded">';
ResultForm += '<input type="hidden" name="recipient" value=""></input>';
ResultForm += '<input type="hidden" name="subject" value="Vocabulary : Biography"></input>';
ResultForm += '<input type="hidden" name="Exercise" value="Vocabulary : Biography"></input>';
ResultForm += '<input type="hidden" name="realname" value=""></input>';
ResultForm += '<input type="hidden" name="Score" value=""></input>';
ResultForm += '<input type="hidden" name="Start_Time" value=""></input>';
ResultForm += '<input type="hidden" name="End_Time" value=""></input>';
ResultForm += '<input type="hidden" name="title" value="Thanks!"></input>';
ResultForm += '<input type="hidden" name="bgcolor" value="#f9e4b1"></input>';
ResultForm += '<input type="hidden" name="text_color" value="#000033"></input>';
ResultForm += '<input type="hidden" name="sort" value="order:realname,Exercise,Score,Start_Time,End_Time"></input>';
ResultForm += '</form></body></html>';
function GetUserName()
{
}
function SendResults(Score){
var today = new Date;
var NewName = '' + today.getTime();
var NewWin = window.open('', NewName, 'toolbar=no,location=no,directories=no,status=no, menubar=no,scrollbars=yes,resizable=no,,width=400,height=300');
//If user has prevented popups, no way to proceed -- exit
if (NewWin == null){
return;
}
NewWin.document.clear();
NewWin.document.open();
NewWin.document.write(ResultForm);
NewWin.document.close();
NewWin.document.Results.Score.value = Score + '%';
NewWin.document.Results.realname.value = UserName;
NewWin.document.Results.End_Time.value = (new Date()).toLocaleString();
NewWin.document.Results.Start_Time.value = StartTime;
NewWin.document.Results.submit();
}
and now I get this
//CODE FOR HANDLING SENDING OF RESULTS
var UserName = '';
var StartTime = (new Date()).toLocaleString();
var ResultForm = '<form name="Results" id="Results" action="../../traitement.php" method="post" enctype="x-www-form-encoded">';
ResultForm += '<input type="hidden" name="recipient" value=""></input>';
ResultForm += '<input type="hidden" name="subject" value="Vocabulary : Biography"></input>';
ResultForm += '<input type="hidden" name="Exercise" value="Vocabulary : Biography"></input>';
ResultForm += '<input type="hidden" name="realname" value=""></input>';
ResultForm += '<input type="hidden" name="Score" value=""></input>';
ResultForm += '<input type="hidden" name="Start_Time" value=""></input>';
ResultForm += '<input type="hidden" name="End_Time" value=""></input>';
ResultForm += '<input type="hidden" name="title" value="Thanks!"></input>';
ResultForm += '<input type="hidden" name="httpReferrer" value="' + document.location.href + '"></input>';
ResultForm += '<input type="hidden" name="bgcolor" value="' + getComputedStyle(document.documentElement).getPropertyValue('--strPageBGColor') +'"></input>';
ResultForm += '<input type="hidden" name="text_color" value="' + getComputedStyle(document.documentElement).getPropertyValue('--strTitleColor') + '"></input>';
ResultForm += '<input type="hidden" name="sort" value="order:realname,Exercise,Score,Start_Time,End_Time,httpReferrer"></input>';
ResultForm += '</form>';
function GetUserName(){
}
function SendResults(Score){
var today = new Date;
var NewName = '' + today.getTime();
var NewWin = window.open('', NewName, 'toolbar=no,location=no,directories=no,status=no, menubar=no,scrollbars=yes,resizable=no,,width=400,height=300');
//If user has prevented popups, no way to proceed -- exit
if (NewWin == null){
return;
}
NewWin.document.body.innerHTML = ResultForm;
var frm = NewWin.document.getElementById('Results');
frm.Score.value = Score + '%';
frm.realname.value = UserName;
frm.End_Time.value = (new Date()).toLocaleString();
frm.Start_Time.value = StartTime;
frm.submit();
}
What can I do to make it work again?
Thanks in advance.
Jean-Marc Cadio
53000 Laval - France
--
You received this message because you are subscribed to a topic in the Google Groups "hotpotatoesusers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/hotpotatoesusers/iXRGeTUtApk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to hotpotatoesuse...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/hotpotatoesusers/6663d110-0132-4fe5-a5e4-39d46f7d84f5n%40googlegroups.com.