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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Clear part of the page when users search again

Status
Not open for further replies.

ciberperson

Programmer
Aug 31, 2000
29
CA
I have a page with a short form containing 2 input boxes. The user completes the boxes and hits FIND and the results are displayed in the lower half of the screen (outside the form tags). What they want is to enter new data in those 2 fields (overwrite the first input) and have the bottom of the page (with the first results) clear when they click the Find button, so they don't get confused while the script executes.

Is this possible with a Javascript code? THANKS
 
it's possible in any code. the only thing is how are you doing it in the first place. is this a ASP search or a javascript search. how are you displaying your results? can't you simply set the results to 0 when the button is hit again _______________________________________________
[sub]{ str = "sleep is good for you. sleep gives you the energy you need to function";
ptr = /sleep/gi;Nstr = str.replace(ptr,"coffee");alert(Nstr); }[/sub]
_______________________________________________
for the best results to your questions: FAQ333-2924
has you're questio
 
I'm using VBscript in an .asp page but I was thinking I would need to use Javascript since this seems to be an event driven procedure. I've been looking for something in JS that would either document.clear or reset, erasing all the HTML output for the results of the search. The search calls a com object which brings back results from the database.

I'm not sure how to "set the results to 0 when the button is hit". Can you provide some help there.

I guess I could incorporat my HTML results output so that it is between the form tags, then I could use a form reset and that might do it. Any other ideas? Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top