• Post Reply Bookmark Topic Watch Topic
  • New Topic

problem in getting values in combo box and check boxes  RSS feed

 
madhuri kunchala
Ranch Hand
Posts: 350
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
im my application....i m facing problem during modification..in it im unable to get values for comboboxes and check boxes..i m not getting any idea how to get the values for the combo-boxes and checkboxes...here is my code for combo-boxes

modify.jsp


javascript


can anyone check it and provide me the solution
 
Ankit Garg
Sheriff
Posts: 9610
37
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think this has much to do with JSP. The syntax document.frm.allowPostPaid is expecting your combo box to be in a form named frm which its not (try to use document.allowPostPaid). Also the standard way to assign values to such a field would be to use getElementById and assign an id to your combo box...
 
madhuri kunchala
Ranch Hand
Posts: 350
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi ankith,
i tried what you suggested..if im giving 'document.allowPostPaid.value= "<%=strCombo%>";' it is showing error...is there any way to get...or can you provide me any example...
 
Ankit Garg
Sheriff
Posts: 9610
37
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it is showing error

What error is it showing?? Are you getting an error in javascript or on server side?? If its in javascript did you try the getElementById solution that I suggested??
 
madhuri kunchala
Ranch Hand
Posts: 350
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
im getting error in javascript...the error is 'document.allowPostPaid is undefined'
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why isn't it in a form?

Please stop using all that embedded CSS--besides being poor style, it obscures the information relevant to your questions.
 
kavita vala
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try this in javascript

document.getElementById('allowPostPaid').value
you get your combobox value

and give your select tag id which you use in getElementById()

e.g<select id="allowPostPaid" name = "allowPostPaid">
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66306
152
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please take the time to choose an appropriate forum for your posts. This forum is for questions on JSP. For more information, please click this link ⇒ CarefullyChooseOneForum.

This post has been moved to a more appropriate forum.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!