Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Selective search using textbox, and button

Status
Not open for further replies.

Lenvdb

Programmer
Jun 21, 2002
81
GB
Heya gurus and wizards of ASP
I am in need of some magic and advice here.
I have a textbox ( Input type="text") and next to that a small button. I am using a HREF tag with an Image of a button as I dont want to Submit/Post the form. Then I have a Select box next to this. The way it must work is that a user will type a few characters of a persons last name in the textbox. The click of the IMG (button) will do a search using a SQL query with a like clause and fill the Select box with the results of the recordset.
I want this to happen without having to reload the ASP page. Is this possible?

What would my approach be for this?
Any pointers will be appreciated. And if you perhaps have some samplecode , even better B-)

Rgds

Len
 
Since your database is residing on the server, some communication must be made back in order to do the query and get results back. Your only options here are submitting the page back or writing a fancy client-side script that opens a new window (or uses and existing iframe) that will query the database for you in an asp page and return the results back to the parent window. You would need to pass it the search criteria (in querystring) and then have it pass an array back to the parent window during the onLoad event.
-Tarwn "The problem with a kludge is eventually you're going to have to back and do it right." - Programmers Saying (The Wiz Biz - Rick Cook)
"Your a geek!" - My Girlfriends saying
 
Thanks Tarwn
I see the only option here is then to load the table into an client side array in JScript for this purpose.
Done that before so will go on coding that. Thanks a mil for your help.

Len

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top