I have the worlds most simple javascript function:
fnSubmit()
{
window.print();
document.formname.submit();
}
Which is called by:
<button type=button id=submit onclick=fnSubmit()>Submit</button>
All is well and good, the print dialog shows up, however after printing or canceling the print I get the following error:
document.formname.submit is not a function
My form is defined as follows: (obviously I am not using formname in the actual code but you get the idea)
<form name=formname id=formname method=post action=<?=$_SERVER['SCRIPT_NAME']?>>
Obviously I am not trying to do anything special here and I have used similar approaches in the past, what in the world am I missing here?