hcl-bot
1
I am trying to submit the form using Java script code, but I am getting the error in that line “Invalid Syntax” error. What could be the problem?
function EditandReturnValues(form)
{
var dialog = window.document.forms[0];
var launcher = window.opener.document.forms[0];
var a = dialog.YearPosted.value;
launcher.YearPosted.value = a;
launcher.PrimaryStatus.value =“Rep Approve” ;
//var WorkflowHistory = DateTimeStamp+“Set status to Rep Approve”;
//if( launcher.SaveHistory.value == “” )
// { launcher.SaveHistory.value = WorkflowHistory; }
//else
//{ launcher.SaveHistory.value = launcher.SaveHistory.value +", "+ WorkflowHistory;};
window.close();
launcher.submit();
}
hcl-bot
2
Subject: Error in JavaScript form.Submit()
In place of launcher.submit(); try with the following Javascript method:
document.forms[0].submit();
Regards,
Balu
hcl-bot
3
Subject: Error in JavaScript form.Submit()
I’m not sure but I think that the launcher is the window.opener and it is not the current window.
Maybe you have to write:
window.opener.document.forms[0].submit()
hcl-bot
4
Subject: Error in JavaScript form.Submit()
Do you use the get-method on your form?If so, use the post-method instead.
More info about this issue:
http://www.netlobo.com/ie_form_submit.html