NoamBarz
Feb 15th 2009, 11:41 pm
Hi
I have a form with the action attribute set to a javascript function (action="javascript:DoSomething();"). In my function, after checking that the data was entered properly, I want to submit the form.
I use something like this:
var frm = document.frm; (my form)
if(frm){
frm.action = 'newpage.php';
frm.submit();
}
There's nothing wrong with this code except that in chrome, nothing happens after I click the submit button for the first time. The form submits only after the second click.
Any ideas why?
I have a form with the action attribute set to a javascript function (action="javascript:DoSomething();"). In my function, after checking that the data was entered properly, I want to submit the form.
I use something like this:
var frm = document.frm; (my form)
if(frm){
frm.action = 'newpage.php';
frm.submit();
}
There's nothing wrong with this code except that in chrome, nothing happens after I click the submit button for the first time. The form submits only after the second click.
Any ideas why?