aspose file tools*
The moose likes Struts and the fly likes html:select not working with innerHTLM Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "html:select not working with innerHTLM " Watch "html:select not working with innerHTLM " New topic
Author

html:select not working with innerHTLM

giridhar jaligama
Greenhorn

Joined: Sep 21, 2008
Posts: 3
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...
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61420
    
  67

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61420
    
  67

P.S. Clicking 'disable smilies' when posting will make your ode look a lot less surprised.
giridhar jaligama
Greenhorn

Joined: Sep 21, 2008
Posts: 3
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: html:select not working with innerHTLM