• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Javascript Manipulation of Struts SELECT

 
Siva Arun
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am having a dynamic table structure below.


productList is having Product objects. I need to take the price value (productUnitPrice) out of Product object and assign to the 'txtUnitPrice' text box based on the selected product. I have stuck with the below code. Can you help me to proceed further?




 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why not just access the select box directly (use its "styleId" attribute) and grab its value and set it to the text box?

I'd *strongly* recommend using a JavaScript library like jQuery, Prototype, etc.

I'm also moving this to HTML and JavaScript as this seems to be more a JavaScript/DOM issue than Struts, at least once you use the styleId attribute.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic