You need to add some javascript to the ExternalHIT HTML that will extract parameters from its own URL:
function turkGetParam( name ) {
var regexS = "[\?&]"+name+"=([^&#]*)";
var regex = new RegExp( regexS );
var tmpURL = fullurl;
var results = regex.exec( tmpURL );
if( results == null ) {
return "";
} else {
return results[1];
}
}
// ASSIGNS THE URL PARAMETERS TO JAVASCRIPT VARIABLES
var assign = turkGetParam('assignmentId');
var hit = turkGetParam('hitId');
var worker = turkGetParam('workerId');
You can then use the assign
variable to do whatever you want (e.g., printing to the page writing to a form field, etc.).