Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

not able to populate textfield using ajax, but select is working fine

 
adeeb alexander
Ranch Hand
Posts: 268
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.

I am not able to understand where I am going wrong. Can someone please point out. I am trying to populate a textfield from database when i select a value from select. Though I am able to populate another select instead of textfield, when I am changing the element to textfield, i am not getting output. The code is below.


exp4.jsp



price.jsp




Thanks and Regards
Adeeb
 
adeeb alexander
Ranch Hand
Posts: 268
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok guys.

I did trial and error and I got close to solution. What I did is below.



I place the elements in a table and gave an id to <td> tag, as you can see. This works. I want to give id to <input id="1a" type="text" name="loc"/> some thing like that. I there any way to do that. I would also like to know why it is not working when I assign id to textbox.

Thanks
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
inputs do not have innerHTML, they have value.

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic