• 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:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

how to call one textfield to another textfield

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi i need one clarification in strut 2.

I have 2 fields , RollNumber and Name. I inserted 2 fields values to table directly. In jsp page i have a two textbox

rollnumber and name. if i will give input rollnumber that matched for table RollNumber field means corresponding name displayed

for Name textfield, the name textfield fill when focus comes not submitting the submit button.

 
Sheriff
Posts: 9697
43
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Okay so as I understand it, you have a table which has roll number and name fields. Now in your JSP, you want that when a roll number is entered, then the corresponding name should be automatically filled without submitting the page. This can be done using AJAX, you just need to make an AJAX call to an action which will search the database for the roll number and return the name found...
 
vaduganathan kumarasamy
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please send any example code or any link...... I searched but i didn't find any ajax related links..
 
Ankit Garg
Sheriff
Posts: 9697
43
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You won't find an example exactly for what you want, look at a tutorial like this or this on how to make an ajax call. The server side code of the Action would be just like a normal Action, you'll have to send a very small response that will contain the name for the corresponding roll number. For this you can directly get the ServletResponse object into your action and send this response (or you can use a servlet for this too )...
reply
    Bookmark Topic Watch Topic
  • New Topic