raviprakashg Posted March 13, 2006 Share Posted March 13, 2006 <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 More sharing options...
Guest you_rock2003 Posted March 13, 2006 Share Posted March 13, 2006 <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 <{POST_SNAPBACK}> 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 More sharing options...
miteshbhimjiyaani Posted March 14, 2006 Share Posted March 14, 2006 <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 <{POST_SNAPBACK}> ==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 More sharing options...
raviprakashg Posted March 15, 2006 Author Share Posted March 15, 2006 thanks to everyone, finaly i got the answer to it it iam using an <input "file"> element and i fired without giving correct path so thay i got the error Access is Denied Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now