homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

Two processes started from one <form>?
I want to display a message while doing a search

10+ Year Member

Msg#: 3772 posted 4:10 pm on May 25, 2005 (gmt 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


Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved