事件不在托管服务器上工作 [英] Event not working on hosting server
本文介绍了事件不在托管服务器上工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
<!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>
我的尝试:
im使用php表单它在本地服务器上运行良好,登录后重定向另一页但在托管服务器提交按钮不工作.plz帮助解决我的问题
What I have tried:
i m using php form it is work well on local server and after login redirect another page but on hosting server submit button not working.plz help to solve my problem
推荐答案
'|| 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(ⅰ)==: || emal.charAt(i)=='>'|| emal.charAt(i)=='<'|| emal.charAt(i)==','|| emal.charAt(i)=='('|| emal.charAt(i)==')'))
{
alert(无效的电子邮件地址) );
return(false);
objx.focus();
}
else if(emal.charAt(i-1)=='。'&& emal.charAt(i)=='。')
{
alert(无效的电子邮件地址);
objx.focus();
return(false);
}
else if(emal.charAt(i)=='@')
{
email_at_count ++ ;
}
}
if(email_at_count> 1)
{
alert(无效的电子邮件地址);
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(无效电子邮件地址);
return(false);
objx.focus();
}
fir2 = obj;
for(i = 0; i< fir2.length; i ++)
{
if(fir2.charAt(i)== @&& fir2.charAt(i + 1)==。)
{
alert(无效的电子邮件地址);
return(false);
objx.focus();
}
if(fir2.charAt(i)== - && fir2.charAt(i + 1)==@)
{
alert(无效的电子邮件地址);
return(false);
objx.focus();
}
if(fir2.charAt(i)==。&& fir2.charAt(i + 1)==)
{
alert(无效的电子邮件地址);
return(false);
objx.focus();
}
if(fir2.charAt(i)==。&& fir2.charAt(i + 2)==)
{
alert(无效的电子邮件地址);
return(false);
objx.focus();
}
}
}
返回true;
}
其他
{
}
返回true;
}
< / script>
< body>
< div class =main>
< h1> AllIndiaTaxFiling< / h1>
< div align =center>
< div class =agileinfo_mainid =login-div<?php if(isset(
'|| 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.phpmethod =postname =loginonSubmit =return submit_login();>
< table width =205height =111border =0align =centercellpadding =0cellspacing =3>
< tr>
< td height =29colspan =2align =center>< div class =err_msgid =div_error>
<?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']) &&
这篇关于事件不在托管服务器上工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文