Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8668273
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T18:10:22+00:00 2026-06-12T18:10:22+00:00

I have a page that contains an HTML form that submits back to itself

  • 0

I have a page that contains an HTML form that submits back to itself once the user clicks a link in a list of returned search results. Once they click the link, the page takes the submitted variables, runs a bunch of searches on various external APIs, parses a bunch of data, and adds a bunch of stuff to the database, then redirects to a new page that has been created from that data.

All the searching and parsing can take up to six or seven seconds; I’d like to be able to show the user a “Please Wait” kind of message while all that work is happening behind the scenes.

Trouble is, I can’t show and hide a DIV because it will screw up my PHP redirect if I’ve already generated output before the

header('Location: ' . $newURL);

command. I’ve searched around for answers but while there are many that are similar, none of them are close enough to my specific situation that I can hack around them.

I’d be grateful if someone could point me in the right direction.


Updated version which now works, courtesy @Izkata from his comments below:

jQuery("a").bind('click', function() {
  jQuery('#feedback')[0].innerHTML = 'Searching, please wait...';
})

Turned out what I needed to do was assign bind a the message to the click of a link, not to ‘submit’, as submit was looking for form data.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T18:10:23+00:00Added an answer on June 12, 2026 at 6:10 pm

    The simplest way I can think of doesn’t require the server to do anything:

    <div id='wait_message' style='display: none;'>
       Please wait while search is in progress...
    </div>
    
    ...
    
    $$('.links').observe('click', function(e) {
       $('wait_message').show();
    });
    

    (Event is written using Prototype.js; you should use whatever is appropriate (JQuery/mootools/etc))


    Using the example page in the comments, this works – it runs in Firebug, so just putting it on your page somewhere should work just fine.:

    jQuery('#newMovieSearchForm').bind('submit', function() {
       jQuery('#feedback')[0].innerHTML = 'Searching, please wait...';
    })
    

    There’s probably a jQuery-way to update the text instead of using innerHTML, but I don’t know it – we don’t use jQuery here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically, I have a page that contains a form. When a user submits that
All, I have an HTML page that contains a form. When the user completes
I have a page, index.html, that contains both a login and registration form. I
I have an HTML page that contains some filenames that i want to download
I currently have a product view page that contains an MVCContrib HTML Grid with
If I have a string that contains the html from a page I just
I have a var that contains a full html page, including the head, html,
I have a variable that contains the entire html for a page as a
I have a page which contains a html.RenderPartial, that renders an ASP.NET MVC partial
i have a page,say abc.html, that is having a small form with some fields.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.