我有以下網頁在IE中失真,但驗證,我找不到任何問題...... Here's a link to the page在FF,Safari瀏覽器,鉻,但在IE8中是不正確的。在iE8奇怪的網頁問題...可能javascript
我在Chrome中也遇到這個錯誤:「Uncaught TypeError:無法調用null(匿名函數)onload方法'焦點'。
任何建議將是巨大的 - 的代碼,如下所示和所使用的包含文件出現在其他的網頁,從而導致沒有問題可言:
<!--#include virtual="/System/Startup_FranchiseClient.asp"-->
<%
EnsurePageIsHTTPS
Dim blnShowResults : blnShowResults = False
Dim SQLCommand
Dim objConn
Dim rsUser
Dim rsEmail
Dim strTempPassword
Set objConn = Server.CreateObject("ADODB.Connection")
Set rsUser = Server.CreateObject("ADODB.RecordSet")
Set rsEmail = Server.CreateObject("ADODB.RecordSet")
Dim strPassword_Encrypted
Dim objEncrypt : Set objEncrypt = New Encrypt_MD5
If Request.Form("ForgotPassword") = "1" then
SQLCommand = "SELECT * FROM Clients WHERE EmailAddress = '" & CleanSQLText(Request.Form("strUsername")) & "'"
objConn.Open strConn
rsUser.Open SQLCommand, objConn, adOpenKeySet, adLockOptimistic
if rsUser.RecordCount <> 1 then
strSecurity_LoginError = "Sorry, your details could not be found. Please check your email address and try again.<br>"
Else
strTempPassword = NewGUID()
strTempPassword = Mid(strTempPassword, 2, 8)
strPassword_Encrypted = objEncrypt.EncryptMD5(strTempPassword)
rsUser("ResetPasswordOnNextLogin") = True
rsUser("Password") = strPassword_Encrypted
rsUser.Update
blnShowResults = True
SQLCommand = "SELECT '" & CleanSQLText(strTempPassword) & "' AS NewPassword, EmailAddress FROM uvw_EmailContent_ForgotPassword WHERE EmailAddress = '" & CleanSQLText(Request.Form("strUsername")) & "'"
rsEmail.Open SQLCommand, objConn, adOpenStatic, adLockReadOnly
SendPublicFranchiseEmailTemplate GetSiteConfig("Public_AutoEmailsFrom"), rsEmail("EmailAddress"), "Inside Guides Password Assistance", "EmailTemplate_ForgotPassword", True, rsEmail
blnShowResults = True
End if
rsUser.Close
Set rsUser = Nothing
End if
%>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Inside-Guides.co.uk - Advertiser Admin</title>
<!--#include virtual="/Assets/Templates/Public/Franchise/HeadCSS.asp"-->
</head>
<body class="advertisers" onload="javascript:document.getElementById('strUsername').focus();">
<!--#include virtual="/Assets/Templates/Public/Franchise/TemplateStartPages.asp"-->
<h1>Forgot Password</h1>
<%
If blnShowResults = False then
%>
<div class="bg MainCopy">
<p>Please enter your email address below and we will email you your password:</p><br />
<p class="ErrorText"><% = strSecurity_LoginError %></p>
<form name="LoginForm" method="post" action="ForgotPassword.asp">
<input type="hidden" name="ForgotPassword" value="1" />
<table>
<tr>
<th align="left" valign="middle" style="width:110px;">
Email Address:
</th>
<td align="left" valign="middle">
<input type="text" name="strUsername" value="" />
</td>
<td align="right" valign="middle">
<input type="submit" class="submit" value="Send Password" />
</td>
</tr>
</table>
</form>
</div>
<%
Else
%>
<%
If Session("Role_Developer_DebugUser") = True then
%>
<h1><font color="red"><% = strTempPassword %></font></h1>
<%
End if
%>
<span class="MainCopy">A new password has been emailed to you. Please check your email and use the temporary password provided to access your account<br /> via the link provided. You can then choose a new password.</span>
<%
End if
%>
<!--#include virtual="/Assets/Templates/Public/Franchise/TemplateEnd.asp"-->
</body>
</html>
<!--#include virtual="/System/Shutdown.asp"-->
顯示客戶端問題的服務器端代碼是無用的。顯示瀏覽器看到的生成的客戶端代碼。 – epascarello 2010-11-12 20:46:48
您應該停止通過連接字符串並使用參數來停止創建SQL命令。不管CleanSQLText方法有多聰明,都有可能是一個等待被利用的安全漏洞。 – 2010-11-12 20:52:30