Forum Moderators: open
For various reasons I do not have access to add an onsubmit event handler directly.
Can this be written on the client with javascript? I have tried this but can't seem to get the onSubmit event to work. The below function is triggered by <body onload=writeOnSubmit();>
function writeOnSubmit(){
if(document.getElementsByTagName("form").item(4))
{
document.getElementsByTagName("form").item(4).onSubmit="javascript: myHandler()";
}
}
Can this be done?
Many thanks.