I have a button (type button) in a form, which when clicked calls a javascript function. For the moment all I need that function to do is submit the form - i thought it was submit(); but i get an error saying object expected - am i missing something obvious here?
Announcement
Collapse
No announcement yet.
how to submit a form via javascript
Collapse
X
-
Why not just use it as type=submit for the time being rather than type=button. You said thats the only reason you have it up to now, so stick with what you can. Further on, then you acn add more functionality but stick to the above mentioned for now.Matt Sartain
Internet Solutions Developer
- Zonecom Communications
-
Why not just use it as type=submit for the time being rather than type=button. You said thats the only reason you have it up to now, so stick with what you can. Further on, then you acn add more functionality but stick to the above mentioned for now.Matt Sartain
Internet Solutions Developer
- Zonecom Communications
Comment
-
Thanks!
Cheers Willy, Don't know why i didnt think of that before, I guess I was thinking that if validation was to be done I wouldn't be able to use submit.
I presume in the validation I return either true or false depending on the result of the checks.
Thanks again for your help :-)
Comment
Comment