Событие не работает на хостинговом сервере
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <link rel="stylesheet" href="..\css\jquery-ui.css" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>API CALL</title> <script src="..\js\jquery-1.11.1.min.js"></script> <script type="text/javascript" src="../js/jquery-1.11.1.min.js"></script> <!-- //js --> <link href="C:\httpdocs\css\stylelogin.css" rel="stylesheet" type="text/css"> <link href='//fonts.googleapis.com/css?family=Comfortaa:400,300,700' rel='stylesheet' type='text/css'> </head> <script language="javascript"> function submit_login() { if(document.getElementById('txtusername').value=="" || document.getElementById('txtusername').value=="Enter Username") { document.getElementById('div_error').innerHTML="Please enter Username"; document.getElementById('txtusername').focus(); return false; } if(document.getElementById('txtpassword').value=="" || document.getElementById('txtpassword').value=="Password") { document.getElementById('div_error').innerHTML="Please enter password"; document.getElementById('txtpassword').focus(); return false; } document.login.submit(); } function validate_email() { if(document.getElementById('txtuseremail').value=="") { document.getElementById('div_error_forgot').innerHTML="Please enter your Email Id"; document.getElementById('txtuseremail').focus(); return false; } else { if(inEmailID(document.getElementById('txtuseremail'))) { return true; } else { return false; } } document.forgot_password.submit(); } function inEmailID(objx) { var obj=trim(objx.value); if(obj!='') { pass = obj.indexOf('@',0); pass1 = obj.indexOf('.',0); if(obj!="") { pass = obj.indexOf('@',0); pass1 = obj.indexOf('.',0); if((pass==-1) || (pass1==-1)) { alert("Invalid Email address"); objx.focus(); return(false); } //var l=document.forms[0].elements[0].value.length; var emal=obj; var email_at_count=0; var i; for(i=0;i<emal.length;i++) { if((emal.charAt(i)==" " || emal.charAt(i)=='#' || emal.charAt(i)=='$'|| emal.charAt(i)=='%' || emal.charAt(i)=='?' || emal.charAt(i)=='/' || emal.charAt(i)=='^' || emal.charAt(i)=='&' || emal.charAt(i)=='*' || emal.charAt(i)=='' || emal.charAt(i)=='+' || emal.charAt(i)=='{' || emal.charAt(i)=='}' || emal.charAt(i)==']' || emal.charAt(i)=='[' || emal.charAt(i)==';' || emal.charAt(i)==':'|| emal.charAt(i)=='>' || emal.charAt(i)=='<' || emal.charAt(i)==',' || emal.charAt(i)=='(' || emal.charAt(i)==')')) { alert("Invalid Email address"); return(false); objx.focus(); } else if(emal.charAt(i-1)=='.' && emal.charAt(i)=='.') { alert("Invalid Email address"); objx.focus(); return(false); } else if(emal.charAt(i)=='@') { email_at_count++; } } if(email_at_count > 1) { alert("Invalid Email address"); return(false); objx.focus(); } var fir,fir2; fir=obj.charAt(0); if((fir=='0') || (fir=='1') || (fir=='2') || (fir=='3') || (fir=='4') || (fir=='5') || (fir=='6') || (fir=='7') || (fir=='8') || (fir=='9') || (fir=='@') || (fir=='.') ) { alert("Invalid Email address"); return(false); objx.focus(); } fir2=obj; for(i=0;i<fir2.length;i++) { if(fir2.charAt(i)=="@" && fir2.charAt(i+1)==".") { alert("Invalid Email address"); return(false); objx.focus(); } if(fir2.charAt(i)=="-" && fir2.charAt(i+1)=="@") { alert("Invalid Email address"); return(false); objx.focus(); } if(fir2.charAt(i)=="." && fir2.charAt(i+1)=="") { alert("Invalid Email address"); return(false); objx.focus(); } if(fir2.charAt(i)=="." && fir2.charAt(i+2)=="") { alert("Invalid Email address"); return(false); objx.focus(); } } } return true; } else { } return true; } </script> <body> <div class="main"> <h1>AllIndiaTaxFiling</h1> <div align="center"> <div class="agileinfo_main" id="login-div" <?php if(isset($_REQUEST['message-email'])){echo ' style="display:none" ';}?> <form action="https://erpcapro.in/api/login.php" method="post" name="login" onSubmit="return submit_login();"> <table width="205" height="111" border="0" align="center" cellpadding="0" cellspacing="3"> <tr> <td height="29" colspan="2" align="center"><div class="err_msg" id="div_error"> <?php if(isset($_REQUEST['message']) && $_REQUEST['message']=='wrong_password') echo "Invalid Login Details";?> <?php if(isset($_REQUEST['message']) && $_REQUEST['message']=='expired') echo 'Account has been expired.';?> <?php if(isset($_SESSION['msg']) && $_SESSION['msg']=='') {echo $_SESSION['msg'];unset($_SESSION['msg']);}?> </div></td> </tr> <tr> <td height="23" colspan="2"><input name="txtusername" type="text" class="login_textbox" id="txtusername" value="Enter Username" onFocus="if(this.value=='Enter Username') this.value='';" onBlur="if(this.value=='') this.value='Enter Username';"/> </td> </tr> <tr> <td height="23" colspan="2"><input name="txtpassword" type="password" class="login_textbox" id="txtpassword" value="Password" onfocus="if(this.value=='Password') this.value='';" onBlur="if(this.value=='') this.value='Password';"/></td> </tr> <tr> <td > <div style="font-size:13px;color:#009900;padding:5px;cursor:pointer;" onClick="document.getElementById('login-div').style.display='none';document.getElementById('forgot-password').style.display='block';">Forgot Password</div> </td> <td align="right"> <input type="submit" value="Login"/> <input type="hidden" name="acccode" value="WECA1004"/> </td> </tr> </table> </form> </div> </div> <div align="center"> <div class="agileinfo_main" id="forgot-password" <?php if(isset($_REQUEST['message-email'])){echo ' style="display:block" ';}else{echo ' style="display:none" ';}?> <form action="https://erpcapro.in/api/forgot-passwordhp.php" method="post" name="forgot_password" onSubmit="return validate_email();"> <table width="205" height="111" border="0" align="center" cellpadding="0" cellspacing="3"> <tr> <td height="29" colspan="2" align="center"><div class="err_msg" id="div_error_forgot"> <?php if(isset($_REQUEST['message-email']) && $_REQUEST['message-email']=='wrong_email') echo "This Email does not Exists."; if(isset($_REQUEST['message-email']) && $_REQUEST['message-email']=='email_sent') echo "Your Password Has been Reset Successfully and instructions has been sent to your email id."; ?> </div></td> </tr> <tr> <td height="29" colspan="2" align="left"><p>Enter your Email-id to reset your password</p></td> </tr> <tr> <td height="23" colspan="2"><input name="txtuseremail" type="text" class="login_textbox" id="txtuseremail" /> </td> </tr> <tr> <td> <div style="font-size:13px;color:#009900;padding:5px;cursor:pointer;" onClick="document.getElementById('login-div').style.display='block';document.getElementById('forgot-password').style.display='none';">Login</div> </td> <td align="right"><input type="submit" value="submit"/><input type="hidden" name="acccode" value="WECA1004"/></td> </tr> </table> </form> </div> </div> </div> </body> </html>
Что я уже пробовал:
я использую php-форму, она хорошо работает на локальном сервере и после входа перенаправляет другую страницу, но на хостинговом сервере кнопка отправки не работает.plz помогите решить мою проблему