We help IT Professionals succeed at work.

How to show loading page after clicking submit button?

pixalax asked
Last Modified: 2010-04-21
Hello all,
 Maybe my topic is not right but I didn't know how could I describe it with a short sentence.
 What I would like to have ;

 I have got a normal order form, once member will click submit button;

 1. The Submit button name should change to Submit -> Processing...
 2. A new transparent page should appear and show loading image and I also would like to write some text.
 3. The page somehow should be protected from refreshing. Since the order will be delivered automaticly (taking the items from database and delivering).

 If page will refresh because of refreshing, database may deliver x2 - x3 more items, or wont deliver any items at all because it will find an error.
 I also would like to know if following wish is possible;
 New transparent page (layer) will do all process and when it is done, it will write;

 "Your order has been delivered. Click here to view your order"

 Thank you for your time and help.

Best regards,

 Thank you for your help and time.
Watch Question

for Q 1 and 3
function validateFrm(){
   document.processFrm.Process.value='Please Wait';
   return true;
<FORM NAME="processFrm" ACTION="process.asp" METHOD="post" onsubmit="return validateFrm()">
<INPUT id="Process" name="Process" type="submit"  value="Submit">

Open in new window

You have to do this BEFORE you submit the form.  Use java script to submit the form, not the SUBMIT in the FORM tag, and just before you do the javascript submit, you write text or an image to a SPAN tag on the page (I do this all the time, so I know it works) -- but when the form submits, then the page WILL refresh.

"The page somehow should be protected from refreshing."

Can't do this easily.  You simply tell the user what has happened, an error, or the submit went through.  The whole point of a form is to tell the user that the action succeeded or did not, isn't the user entitled to know that his effort in your page got some results?

I think you need to rethink your logic.  Say you gave your CC info, name and address to some web page in good faith, and then it just siezed on you -- you would be ripped, and suspect them of fraud, right?


There is nothing about paying money in this page. It is just taking some points from user's point in order to deliver the electronic items but still it will be better with higher security, all I want is ;
1. Proccessing... Please wait. text
2. User won't be able to refresh the page
3. Submit button should be pressed 2nd time.

did u try above code ?


I tried thank you but, still I need some kind of layer showing up :(
Like when you try to delete the question a layer shows up, (transparent white page for example you can't click anything, just processing... please wait text and image I would like to put :)
This one is on us!
(Get your first solution completely free - no credit card required)


Thank you for your answers and time.
What should I do now?
All answers are the solution some how? I am new here guys, sorry.

last one would be nice


Thank you..
Sorry for delay, just had too much work to do nowadays.
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.