• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to submit a page on change of Combo using Struts  RSS feed

 
Moinder Tank
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have tried <html:select property="ordId" onchange='document.forms[0].submit()'> but it didn't work, then I replace ' quotes with " quotes then also it didn't work giving error on submit() function, then i tried <html:select property="ordId" onchange="alert(document.forms[0].submit)">, it returns the object.
 
Junilu Lacar
Sheriff
Posts: 10950
158
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are probably getting a conflict between your submit button and the javascript submit method.
In your ActionForm, add a String field called action + getter/setter. Your submit tags should then use the property attribute, like so:
<html:submit property="action">Submit</html:submit>
This will take care of the conflict and your javascript should work.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!