jQuery in Action, 2nd edition*
The moose likes JSP and the fly likes adding 'option' into 'select'... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "adding Watch "adding New topic
Author

adding 'option' into 'select'...

ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
How is this way of adding options into select (dropdown list)?



I think, this can't not be called 'no scriptlet' code. We have just changed the position of code (moved code in script from scriptlet). I don't think, a good idea.

What's your opinion?

Thanks.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60800
    
  65

I agree. Why use scritplet code to create JavaScript that will populate the options on the client when you can just populate the options directly on the server?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: adding 'option' into 'select'...
 
Similar Threads
How to add form fields dynamically
show and insert data from list depending on choice of radio button
Show a hidden text field
selection box problem
list......jsp, javascript