Jump to content

Message While Posting


scott.russell

Recommended Posts

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?

Link to comment
https://forums.phpfreaks.com/topic/11488-message-while-posting/#findComment-43177
Share on other sites

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]
Link to comment
https://forums.phpfreaks.com/topic/11488-message-while-posting/#findComment-43182
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.