• 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

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

Posts: 1
  • Mark post as helpful
  • send pies
  • 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.
    Bookmark Topic Watch Topic
  • New Topic