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
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