Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Please wait message

Status
Not open for further replies.

jordan11

Technical User
May 24, 2003
150
0
0
GB
Hi,
I have an urgent problem I am using asp.net and my validation on my form is

<script language="JavaScript">
function sendMessage(){
var theName = document.form1.name.value;
var theEmail = document.form1.email.value;
validMail=theEmail.indexOf('@')
var theTel = document.form1.tel.value;
var theComments = document.form1.comments.value;
if(theName==''||theEmail==''||theTel==''||theComments=='') {
alert('All fields for this form are required');
} else if(validMail<1 || validMail==(theEmail.length-1)){
alert('You must enter a valid email address');
} else {
form1.Textbox.value = "Hello from JavaScript"

document.form1.action="page2.aspx";
document.form1.submit();
}
}
</script>



before the form is submitted to the second page i will like to diplay a message that says "please wait etc" while waiting for page2.aspx"; to display.


I have <% response.buffer= true %> on the top of the first page but just not sure how to get the message to display on the first page while document.form1.action="page2.aspx";
document.form1.submit(); is happening. I have been stuck on this problem for hours now and can not get it to work.




Thanks in advance
 
search the forum..this has be comming up alot lately..


you can create a new page that shows the message..then on that page use the below to wait 4 seconds before going to your next page..

<meta http-equiv="refresh" content="4;URL=default.aspx">

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top