• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

I need to enter some value in JSP text field and then need to press enter which should fetch data

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am facing a problem like when I enter some value in Text field and then i have to press Enter button then that
event should fetch the remaining data from the Database associated to that entered value.

<tr>
<th>Application No</th>
<td><html:text property="appno" onkeypress="getAppDetails()" /></td>
</tr>

How this event function is going to be called in action.
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why wouldn't you just use a form?
 
Bala Ranch
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi David,

Can you elaborate on how to use form to invoke the Text Box event.
 
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bala Ranch wrote: when I enter some value in Text field and then i have to press Enter button then that
event should fetch the remaining data from the Database associated to that entered value.



can you clarify this bit more ?
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
welcome to javaranch Bala
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oh, you mean you want to replace the value in the textbox with the results of an Ajax request?
 
Bala Ranch
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

i have diff requirement compared to normal action call
i need to enter some primary key value in JSP Text field and then i need to press enter button then that event should call the action class method from javascript.
so when i press enter button for that i wrote onkeypress event which is defined in Javascript in turn which should call action class method which has the functionality code to fetch the database .

One JSP with some text fields like ID and name.when i enter ID value and then enter key then it should fetch the associated values from the database without submit() action.

It's very urgent.
reply
    Bookmark Topic Watch Topic
  • New Topic