2014-02-12 72 views
0

我做了一個表單登錄,在一個正常的HTML頁面工作。但是,當我把它放在wordpress提交按鈕不起作用。這裏是我的代碼...就像我說的,如果你把代碼放在Dreamweaver中並在瀏覽器中打開它,它確實有效。只有在wordpress中使用相同的代碼,它不工作它說:Uncaught ReferenceError:sendform沒有定義wordpress sendform不工作

感謝您的快速幫助!

<div class="client-area"><form action="https://extranet.proden.com/Proden/Client-Area/LogSys/Log.asp" method="POST" name="LoginClient"> 
<table> 
<tbody> 
<tr> 
<td>Username:</td> 
<td><input tabindex="1" onkeypress="if (event.keyCode == 13) {this.form.submit();}" type="text" name="Username" size="16" /></td> 
<td rowspan="2"><a href="javascript:sendform()"><img style="box-shadow: none;" title="Submit login" alt="Submit login" src="http://altitudeconseil.ca/clients/proden/wp-content/uploads/2013/01/login_submit.png" width="61" height="50" /> 
</a></td> 
</tr> 
<tr> 
<td>Password:</td> 
<td><input tabindex="2" onkeypress="if (event.keyCode == 13) {this.form.submit();}" type="password" name="Password" size="16" /></td> 
</tr> 
<tr> 
<td colspan="3"><input type="hidden" name="autoLoginHidden" value="N" /> 
<p style="text-align: center; font-size: small;"><input id="Checkbox1" tabindex="3" type="checkbox" name="autoLogin" value="true" />Remember me (cookies must be enabled).</p> 
<input type="hidden" name="lang" value="English" /></td> 
</tr> 
</tbody> 
</table> 
</form> 
<p style="font-size: small;">Please enter your username and password. If you do not have access, please <a href="mailto:[email protected]">contact us</a> and a profile will be created for you.</p> 

</div> 
<script type="text/javascript"> 
function sendform() { 
      if(document.LoginClient.autoLogin.checked) 
       document.LoginClient.autoLoginHidden.value = "Y"; 
      else 
       document.LoginClient.autoLoginHidden.value = "N";   
      document.LoginClient.submit() 
     } 
     //alert('For testing purposes the input fields are filled already.') 

</script> 

<script type="text/javascript" src="cookies.js"></script><script type="text/javascript"> 
var cookie = readCookie("ZC_login"); 
     if(cookie) 
     { 
      //window.status = 'username is : ' + document.LoginClient.Username.value + ' should be : ' + cookie; 
      document.LoginClient.Username.value = cookie; 
      document.LoginClient.Password.focus(); 

      var password = readCookie("ZC_password"); 
      var autoLogin = readCookie("ZC_autologin"); 
      if(autoLogin &#038;&#038; autoLogin == "Y") 
      {    
       document.LoginClient.autoLogin.checked = true; 
       document.LoginClient.Password.value = password; 
       sendform(); 
      } 
     } else { 
      document.LoginClient.Username.focus(); 
     } 

</script> 

回答

0

Wordpress phpmailer或通過聯繫表格從Wordpress網站發送表單可能會因爲幾個原因而死機。最常見的。

  • phpmailer未啓用您的主機 - 或者您正在運行一個關閉php版本,或者您的服務器上發生了一些奇怪的事情。聯繫您的主機提供商。

  • 也有噸的插件,或許可以通過切換郵件選項,SMTP或在PHPMailer的清理的預防 問題的成功(這也可能是主題 協助 問題,即工作相關的還有)

檢查出一些最精彩的WP郵件插件:http://wordpress.org/plugins/tags/phpmailer

如果一些知名評論插件不工作 - 聯繫您的主機,他們應該能夠啓用。

其他資源: