Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Community Discussions (All other subjects)
 JS to change entire pages text
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

redbrad0
Advanced Member

USA
3725 Posts

Posted - 03 December 2003 :  19:23:28  Show Profile  Visit redbrad0's Homepage  Send redbrad0 an AOL message
I have a page that after the submit button is clicked I want it to remove the entire form (hide it) and then show a message saying that the information is being processed

Brad
Oklahoma City Online Entertainment Guide
Oklahoma Event Tickets

dayve
Forum Moderator

USA
5820 Posts

Posted - 03 December 2003 :  20:02:50  Show Profile  Visit dayve's Homepage
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?

Go to Top of Page

redbrad0
Advanced Member

USA
3725 Posts

Posted - 03 December 2003 :  20:32:50  Show Profile  Visit redbrad0's Homepage  Send redbrad0 an AOL message
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
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 03 December 2003 :  21:28:29  Show Profile  Visit dayve's Homepage
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'"


Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 03 December 2003 :  22:02:30  Show Profile  Visit dayve's Homepage
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

Go to Top of Page

redbrad0
Advanced Member

USA
3725 Posts

Posted - 03 December 2003 :  22:37:49  Show Profile  Visit redbrad0's Homepage  Send redbrad0 an AOL message
Thanks Dayve it worked great. I have that currently on the site and also a popup progress bar but this is something else that they wanted

Brad
Oklahoma City Online Entertainment Guide
Oklahoma Event Tickets
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 04 December 2003 :  04:44:45  Show Profile  Visit HuwR's Homepage
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 ?
Go to Top of Page

redbrad0
Advanced Member

USA
3725 Posts

Posted - 04 December 2003 :  10:50:08  Show Profile  Visit redbrad0's Homepage  Send redbrad0 an AOL message
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
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 04 December 2003 :  14:40:15  Show Profile  Visit HuwR's Homepage
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
Go to Top of Page

redbrad0
Advanced Member

USA
3725 Posts

Posted - 04 December 2003 :  18:54:27  Show Profile  Visit redbrad0's Homepage  Send redbrad0 an AOL message
Yea they wanted an easy way for the files to get uploaded I have the session variable set higher on that page so hopefully it will always work.

Brad
Oklahoma City Online Entertainment Guide
Oklahoma Event Tickets
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.31 seconds. Powered By: Snitz Forums 2000 Version 3.4.07