59
rated 0 times
[
64]
[
5]
/ answers: 1 / hits: 15275
/ 13 Years ago, fri, november 18, 2011, 12:00:00
Is there a better command than this to check if a form is exists and if so submit it? Right now I'm using:
if(document.forms[0])document.forms[0].submit()
Which works, however if form[0] does not exist it throws an exception. I'm trying to keep this dynamic in the sense I don't know what the form ID or name is.
More From » javascript