Sorry I couldn't get right back to you; had to rush out and do something as soon as I sat down to answer.
Quote:
|
I think in that link was using form name and i want to use formID . thats why its not working
|
That's not it. They were using a different (and more traditional) way of traversing the DOM, but it still selects the same element. It's like the different between going somewhere in a helicopter (getElementByID) and driving there on surface streets (document.formname).
Try
Code:
var myform=document.getElementById(formID);
myform.submit();
One last thing to note is that you are specifying the id of your form correctly; sometimes I get confused and accidentally specify it as the name.
BTW, is that all the code you have so far? If there's a specific situation you're using it in, there could be other elements effecting it.