• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

How to submit a page on change of Combo using Struts

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.
Posts: 15630
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • 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.
I'm just a poor boy, I need no sympathy, because I'm easy come, easy go, little high, little low, little ad
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic