Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.