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, 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
Using an iframe is one way of accomplishing what you want to do, but have you heard of AJAX? If not, then it's just a buzzword that describes functionality that's been around for a few years. Do a web search for AJAX or XMLHttpRequest and you should find some information about the technology. The functionality you're describing seems to match closely to what Google did with their Google Suggest http://www.google.com/webhp?complete=1&hl=en
I agree, AJAX could do this easily. You would need to use the AJAX script to call a server side script eg www.domain.com/script.php3?value=xxxxx The script.php3 page would then query the database to see if the variable xxxx is listed and return yes or no or an array of values for the rest of your form.