• 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

trying to insert values into select using javascript

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i am trying to insert multiple values into a select item in html.Please Help me.The following code is inserting only one item.I am not understanding where the code has gone wrong.




 
Sheriff
Posts: 67746
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
Showing us the server-side code is not helpful (And why are you creating HTMl from a servlet in the first place? That's a really poor practice.)

Please post the HTMl that is sent to the browser. You can find it using View Source in the browser.
 
puja shaw
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bear Bibeault wrote:Showing us the server-side code is not helpful (And why are you creating HTMl from a servlet in the first place? That's a really poor practice.)

Please post the HTMl that is sent to the browser. You can find it using View Source in the browser.



the only new code here is out.println() and a for loop.The rest is all html.I need to write in a servlet as its my requirement.And thanks to the code tags that my html content is shown clearly away from the other part.So what is the problem.?
 
Bear Bibeault
Sheriff
Posts: 67746
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
Please be sure to UseCodeTags, and to make sure that the code is properly formatted and indented when you post it.
 
puja shaw
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bear Bibeault wrote:Please be sure to UseCodeTags, and to make sure that the code is properly formatted and indented when you post it.



yes i used the code tags
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Show us what is generated, looking at that serverside markup is useless when trying to debug JavaScript.
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, I already asked for that, but this member seems to be reluctant to respond to requests for additional information that's needed in order to answer his questions. Not sure why.

puja shaw, if you want people to volunteer their time to help you, you are going to have to ShowSomeEffort and respond when people who want to help you ask for more information.
 
reply
    Bookmark Topic Watch Topic
  • New Topic