This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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
 
jQuery in Action, 2nd edition
 
subject: not able to populate textfield using ajax, but select is working fine
 
Similar Threads
How to get a connection from the connection pool in a servlet
using dynamic drop down multiple time in same page
Drop Down box for Jstl Select query results
dynamically created multiple dynamic selects
Reading xml data in JSP