Win a copy of Murach's MySQL this week in the JDBC and Relational Databases forum!
  • 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

dynamic value to be submitted to form beans

 
Author
Posts: 47
5
MySQL Database PHP Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

This is my favourite forum. I just have a silly problem that's occuring on all of my pages.

If I have a drop down that's dynamically populated from the database through ajax, how do I get the selected value in the associated form bean. The bean takes the value (i tested it in the action class) of the list that is hard coded and not that is dynamically populated.

Here's the jsp:



Here's the script:





When I click the (<html:submit>) button I want the district(dynamic) to be access in the action class, but gives null.
This my first project with J2EE, Struts . Please help.
 
Kanika Sud
Author
Posts: 47
5
MySQL Database PHP Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry folks, this was a silly mistake in the script. The name attribute had not rendered itself properly because of the script.

Error's here:

var drop = '<select name="' + dynaDiv + ' id="' + dynaDiv + '">' + firstOpt + s + '</select>';




Sorry for posting such a silly one there.
 
If you look closely at this tiny ad, you will see five bicycles and a naked woman:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic