• 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 ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

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

 
Greenhorn
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..
 
That which doesn't kill us makes us stronger. I think a piece of pie wouldn't kill me. Tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!