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.