Jump to content

Archived

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

scott.russell

Message While Posting

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
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]

Share this post


Link to post
Share on other sites

×

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.