• 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

Struts 1 - JSP - html:optionsCollection inside function of javascript didn't work

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ranchers,
I have a problem using <html: optionsCollection ..> element inside function of javascript.
I want to display a <div class="row"> which consist of list of Material name in dropdown button and the input text for Percentage(%) of the material choosen.
We can add more of that div-row by clicking 'add' button. So I make a javascript function that can create another div-row after click the button.

The function of javascript is below:



The problem is the <html: optionsCollection ..> element always make the javascript can't be executed.
If I click the 'add' button, nothing happened.
If I delete those part, the dropdown is displayed but there's no value of material name appears. I need that part for displaying the material name, but it didn't work inside js.

Any idea why it's happened? Need your help please..
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic