dcsimg
Why can't my Javascript submit a form?
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Wednesday, February 12, 2003 11:16 AM

I'm using struts and a javascript to submit a form.
Why doesn't work ?


This is a part of my Jsp








...
...
...






Re: Why can't my Javascript submit a form?

Posted By:   Jeanne_Boyarsky  
Posted On:   Wednesday, February 12, 2003 05:30 PM

Did you set a default action for the form? If not, you need to set it in Javascript:
document.movCabForm.action = "goHere";

Re: Why can't my Javascript submit a form?

Posted By:   Christopher_Koenigsberg  
Posted On:   Wednesday, February 12, 2003 12:10 PM

What error do you get?


If the error is, for instance, that the DOM is not finding the page element of that name, then maybe instead of "document.movCabForm.submit()", try "document.forms[0].submit()"?


If there is not an error, then is your "send" function getting called, is the onchange firing? Have you tried an alert inside of send(), to make sure? If it is getting called, is it just returning without submitting the form?

About | Sitemap | Contact