Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

Two processes started from one <form>?

I want to display a message while doing a search

4:10 pm on May 25, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:Dec 18, 2004
votes: 0

I have a page containing 1500 links. I have written an effective, simple script to keyword search the innerHTML and the Title of these links for a keyword and display the list of hits on the page in a <div> just under the search form.

On my PC, this search is fairly fast in FF and NS but takes 2 - 3 sec in IE. It will certainly take longer on many user's machines. For the benefit of users with slow machines, I would like to display a message "Searching Links" on the page during the search. I have written a function that displays a message next to the search box.

The problem: If I invoke this message from the function called from the onSubmit or onClick of the search box, it displays with the results, after the search is complete.

My question: How can I get the message to display first? I have tried calling the search function from an onSubmit in the <form> of the search box and adding the message to the onClick event of the <input> box but this did not work.

Thanks very much