Author |
Topic |
|
redbrad0
Advanced Member
USA
3725 Posts |
|
dayve
Forum Moderator
USA
5820 Posts |
Posted - 03 December 2003 : 20:02:50
|
I can show you an example if you want, but all you have to do is put the form in a div and then onsubmit, write the message you want to the div with a background color of white (or other color) that will hide the form. there are various ways of doing this but most of them revolve around putting the form within a div (layer).
Question though, how long does it take to submit the form requiring a message like this? |
|
|
|
redbrad0
Advanced Member
USA
3725 Posts |
Posted - 03 December 2003 : 20:32:50
|
If you could show me a quick example that would be great.
The form can take anywhere from 1 min to 5 hours to submit. What the form is, is a graphic upload system where sometimes customers upload very large images to be outputted to a large digital printer so a very high DPI file is needed. |
Brad Oklahoma City Online Entertainment Guide Oklahoma Event Tickets |
|
|
dayve
Forum Moderator
USA
5820 Posts |
Posted - 03 December 2003 : 21:28:29
|
I will make you an example, However for forms that take awhile to submit, I do 2 things:
1. I disable the submit button after it is clicked 2. I change the button value from the word SUBMIT to something like PLEASE WAIT WHILE FORM IS BEING PROCESSED. this takes a second to do by adding this line to your submit button:
onclick="value='PLEASE WAIT WHILE FORM IS BEING PROCESSED'"
|
|
|
|
dayve
Forum Moderator
USA
5820 Posts |
Posted - 03 December 2003 : 22:02:30
|
okay, please keep in mind that this is an extremely simplistic example. Instead of replacing the layer, I decided to write to the layer which requires less code:
<html>
<head>
<script type="text/javascript">
function writetoLyr(id, message) {
document.getElementById(id).innerHTML = message;
}
</script>
</head>
<body>
<div id="form">
<form>
<input type="text"><br>
<input type="text"><br>
<input type="text"><br>
<input type="text"><br>
<input type="submit" onclick="javascript:writetoLyr('form','Please Wait!')" value="Submit">
</form>
</div>
</body>
</html>
Demo: http://www.burningsoulsforum.com/form_layers.asp |
|
|
|
redbrad0
Advanced Member
USA
3725 Posts |
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 04 December 2003 : 04:44:45
|
quote:
The form can take anywhere from 1 min to 5 hours to submit.
This is extremely unlikely to work if an upload takes anylonger than 30 mins, are you using an upload component ? |
|
|
redbrad0
Advanced Member
USA
3725 Posts |
Posted - 04 December 2003 : 10:50:08
|
Yes I am using an upload component. I am not sure what the longest time to upload has been but this morning a 1.18 MB file was uploaded which they just needed a way to show that the form is working.
Are you saying that the JS would only work if the upload was 30 mins or less? |
Brad Oklahoma City Online Entertainment Guide Oklahoma Event Tickets |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 04 December 2003 : 14:40:15
|
no, but the upload is unlikely to work if it takes longer than the session timeout value is set to in IIS. http is not really designed for uploading files of more than a couple of meg in size, anything bigger should really be uploaded via ftp to ensure they actually get there in one piece |
|
|
redbrad0
Advanced Member
USA
3725 Posts |
|
|
Topic |
|