Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-17-2005, 03:54 AM   PM User | #1
tllcll
New Coder

 
Join Date: Aug 2005
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
tllcll is an unknown quantity at this point
how to get value without submitting a page

Hi,

I have a form that has many fields (textbox/listbox). when user enter/change a value in the first textbox, I need to pass this value to the database to check whether it exist and get the other values to be displayed to other fields in that form (i cannot get the javascript value to be pass to jsp without reload/refresh/submit. But, I need to get the user entered value, so I thought of hidden popup, iframe, ajax, etc but not sure how I could apply and which best suit this case). If I submit the page then I can easily get the value thru 'request.getParameter("fieldname") but cannot use this because I cannot submit the page.

Pls help and possible provide me with the sample coding

Thanks
tllcll is offline   Reply With Quote
Old 10-17-2005, 05:09 AM   PM User | #2
EvilPenguin
New Coder

 
Join Date: Oct 2005
Location: Melbourne, Australia
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
EvilPenguin is an unknown quantity at this point
What you are looking for is called AJAX (Asynchronous Javascript and XML). Implementing it yourself is not fun (works differently in most major browsers), but luckily there are plenty of good libraries out there.

The one I use is called Prototype. While it doesn't come with any documentation, I did find a good page with code examples here.

You can get Prototype here.

edit:scroll down to the bit with 'The Ajax object' as the heading.

Last edited by EvilPenguin; 10-17-2005 at 05:11 AM..
EvilPenguin is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:51 AM.


Advertisement
Log in to turn off these ads.