Jump to content

Form not Submitting


raviprakashg

Recommended Posts

<script language="JavaScript" type="text/javascript"><!--function dovalidate(){var submit_accepted = false;var chk_val = true;var AllowedChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_01234567890"var AllowedNumbers = "0123456789"var frm = document.EmpEntryif (submit_accepted)  // prevents NN4 resubmission        return(false);if (frm.txtFName.value == "")	{	alert ("Enter First Name of Labour/Employee (i.e initial)");	frm.txtFName.focus();	return false;	}if (frm.txtName.value == "")	{	alert("Enter Name of Labour/Employee");	frm.txtName.focus();	return false;	}	if (chk_val)        //regform.p_js_on.value = 1;//	frm.ButSubmit.value = "Please Wait..."//    frm.ButSubmit.disabled = chk_val;//    alert (chk_val)    submit_accepted = chk_val;return chk_val;}function gowhere(regfrm){	if (dovalidate())  {  alert("Okay")  regfrm.submit()  return true;	  }	}--></script><form action="" method="post" name="EmpEntry" onSubmit="return gowhere(this);"><input name="txtFName" type="text" size="5" value=""> <input name="txtName" type="text" value="" size="30"><input type="submit" name="ButSubmit" value="Submit"></form>

Dear Friends,I got Problem From this code,when i fire the from the from is not Submitting and i got the error: Access is denied(Javascript) if i comment the line "regfrm.submit()", its says nothing and page dose'nt fire, pls tell me How to solve the problem.NB : Its an ASP page

Link to comment
Share on other sites

Guest you_rock2003
<script language="JavaScript" type="text/javascript"><!--function dovalidate(){var submit_accepted = false;var chk_val = true;var AllowedChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_01234567890"var AllowedNumbers = "0123456789"var frm = document.EmpEntryif (submit_accepted)  // prevents NN4 resubmission        return(false);if (frm.txtFName.value == "")	{	alert ("Enter First Name of Labour/Employee (i.e initial)");	frm.txtFName.focus();	return false;	}if (frm.txtName.value == "")	{	alert("Enter Name of Labour/Employee");	frm.txtName.focus();	return false;	}	if (chk_val)        //regform.p_js_on.value = 1;//	frm.ButSubmit.value = "Please Wait..."//    frm.ButSubmit.disabled = chk_val;//    alert (chk_val)    submit_accepted = chk_val;return chk_val;}function gowhere(regfrm){	if (dovalidate())  {  alert("Okay")  regfrm.submit()  return true;	  }	}--></script><form action="" method="post" name="EmpEntry" onSubmit="return gowhere(this);"><input name="txtFName" type="text" size="5" value=""> <input name="txtName" type="text" value="" size="30"><input type="submit" name="ButSubmit" value="Submit"></form>

Dear Friends,I got Problem From this code,when i fire the from the from is not Submitting and i got the error: Access is denied(Javascript) if i comment the line "regfrm.submit()", its says nothing and page dose'nt fire, pls tell me How to solve the problem.NB : Its an ASP page

It works fine for me...it displays an alert with "Okay" in it? Could you explain theproblem in more detail?
Link to comment
Share on other sites

<script language="JavaScript" type="text/javascript"><!--function dovalidate(){var submit_accepted = false;var chk_val = true;var AllowedChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_01234567890"var AllowedNumbers = "0123456789"var frm = document.EmpEntryif (submit_accepted)  // prevents NN4 resubmission        return(false);if (frm.txtFName.value == "")	{	alert ("Enter First Name of Labour/Employee (i.e initial)");	frm.txtFName.focus();	return false;	}if (frm.txtName.value == "")	{	alert("Enter Name of Labour/Employee");	frm.txtName.focus();	return false;	}	if (chk_val)        //regform.p_js_on.value = 1;//	frm.ButSubmit.value = "Please Wait..."//    frm.ButSubmit.disabled = chk_val;//    alert (chk_val)    submit_accepted = chk_val;return chk_val;}function gowhere(regfrm){	if (dovalidate())  {  alert("Okay")  regfrm.submit()  return true;	  }	}--></script><form [B]action=""[/B] method="post" name="EmpEntry" onSubmit="return gowhere(this);"><input name="txtFName" type="text" size="5" value=""> <input name="txtName" type="text" value="" size="30"><input type="submit" name="ButSubmit" value="Submit"></form>

Dear Friends,I got Problem From this code,when i fire the from the from is not Submitting and i got the error: Access is denied(Javascript) if i comment the line "regfrm.submit()", its says nothing and page dose'nt fire, pls tell me How to solve the problem.NB : Its an ASP page

==hi , code is working fine in IE as well as Mozilla , may be u r missing next action page (which i showed in bold text ), just give action page name, it will work.thanks
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...