• 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

html:select not working with innerHTLM

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all,


i am trying to create select box dynamicaly.. I created a button, when I click it creates a row in the form. in that I first cell contains select box. This is I am trying to implement using JavaScript (innerHTML).When I am writing below code run time throwing error.

cell.innerHTML='<html:select property="country[0]"><logic resent name="CountryList"><html ption value="">Select</html ption><html ption value="India">India</html ption><html ption value="USA">USA</html ption>';


This is throwing error. Can you please tell me is html:select works with innerHTML.

I searched on net, few suggested to use <texrea> , but when I used <textarea>, I can not change index property dynamically.

Any comments/suggestions appreciated...
 
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by giridhar jaligama:
Can you please tell me is html:select works with innerHTML.

No. JSP custom tags, be they from Struts or otherwise, are server-side concepts that are converted to plain old HTML before the page is sent to the client.

innerHTML is a client-side JavaScript mechanism that can only deal with pure HTML.
 
Bear Bibeault
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
P.S. Clicking 'disable smilies' when posting will make your ode look a lot less surprised.
 
giridhar jaligama
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bibeault ,

Thanks for the help.

I got the solution which I am looking from this forum "dynamic form elements using struts"...

Thanks once again.
reply
    Bookmark Topic Watch Topic
  • New Topic