scott.russell Posted June 8, 2006 Share Posted June 8, 2006 I am having trouble getting getting a message to pop up while a page is posting to another page. I disabled the submit button when they click it and I need a message to pop up on the page that says Processing or something. Does anyone know a way to do this. Quote Link to comment https://forums.phpfreaks.com/topic/11488-message-while-posting/ Share on other sites More sharing options...
SharkBait Posted June 8, 2006 Share Posted June 8, 2006 I'm guessing it would have to be done with some sorta javascript when the button is pressed.If ya google for javascript popups there should be a ton of examples. You'll just have to hook it on the OnClick for the submit button I suppose. Though I would not be sure how to close it when the page is done processing the request.... Might have to javascript that and when its done processing send a cmd or variables to the currently pop'd up window? Quote Link to comment https://forums.phpfreaks.com/topic/11488-message-while-posting/#findComment-43177 Share on other sites More sharing options...
micah1701 Posted June 8, 2006 Share Posted June 8, 2006 you want to use JavaScript and CSS - this should probably be moved to one of those forums.create a css styled box containing your message and give it a z-index (layer) property on top of the rest of your page and also set it's display property to "none"then, w/ javascript, onSubmit() when you are also getting rid of the button, change the display property back to "block" so it shows the box. whola!something like this:[code]<script>function message(){document.getElementById('messageBox').style.display = 'block';}</script><style>#messageBox{z-index: 2;display: none;border: 1px #333333 solid;padding: 5px;}</style><div id='messageBox'>Please wait while your form is being submitted.</div><form action="" method="post" onSubmit="message()"><input type="submit" name="Submit" value="Submit"></form>[/code] Quote Link to comment https://forums.phpfreaks.com/topic/11488-message-while-posting/#findComment-43182 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.