aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes not able to populate textfield using ajax, but select is working fine Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "not able to populate textfield using ajax, but select is working fine" Watch "not able to populate textfield using ajax, but select is working fine" New topic
Author

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

adeeb alexander
Ranch Hand

Joined: May 29, 2008
Posts: 268
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

Joined: May 29, 2008
Posts: 268
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

Joined: Nov 08, 2001
Posts: 15376
    
    6
inputs do not have innerHTML, they have value.

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