• 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
  • Tim Cooke
  • Paul Clapham
  • Devaka Cooray
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Liutauras Vilda
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Piet Souris
Bartenders:
  • salvin francis
  • Carey Brown
  • Frits Walraven

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..
 
Ew. You guys are ugly with a capital UG. Here, maybe this tiny ad can help:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic