• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

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

 
Ranch Hand
Posts: 268
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
inputs do not have innerHTML, they have value.

Eric
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic