Ive created a popup window to that now allows me to do a little bug reporting, the problem is that the page works in ie - with all of its functions - popping up - grabbing the referer - saying thankyou etc.. But only in firefox.
If you try the same thing in IE it comes up with a lovely error and i just cant see where the problem lies...
The link: - The window pops up fine in ff & ie
<a href="javascript:correction();">report the problem</a>
javascript code: - just a simple popup
function correction() {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open('/tools/correction.aspx', '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=0,width=460,height=400');");
}
The popups Form:
<div id="correctionComplete" runat="server"> <p>Thank you for reporting a problem with this page, we will make sure that someone takes a look at it as soon as posible. Please remember that we cannot reply to submissions form this form only heed their advice.</p> <p id="right"><input type="button" value="Close This Window" onclick="javascript:window.close();" /></p> </div> <form id="correctionForm" runat="server"> <p>Your comments can help make our site better for everyone. If you've found something incorrect, broken, or frustrating on this page, let us know so that we can improve it. Please note that we are unable to respond directly to suggestions made via this form.</p> <p>If you are part of this business and need further help with updating or information, please <a href="####">contact customer support</a>.</p> <h2>Please mark as many of the following boxes that apply:</h2> <table> <tr> <td><asp:CheckBox id="suggestDetails" runat="server" /></td> <td>The page information is missing important details.</td> </tr> <tr> <td><asp:CheckBox id="suggestInformation" runat="server" /></td> <td>The information is incorrect and needs updating.</td> </tr> <tr> <td><asp:CheckBox id="suggestTypos" runat="server" /></td> <td>The page contains typographical errors. </td> </tr> <tr> <td><asp:CheckBox id="suggestSpeed" runat="server" /></td> <td>The page takes too long to load.</td> </tr> <tr> <td><asp:CheckBox id="suggestOther" runat="server" /></td> <td>Other problems with the page.</td> </tr> </table> <p><strong>Comments or Examples:</strong><br/> Examples: Link not working, link going to the wrong place.</p> <asp:TextBox TextMode="MultiLine" columns="60" rows="8" id="suggestText" cssclass="suggestion-text" runat="server"></asp:TextBox> <p class="comment-submit"><asp:Button id="btnSubmit" runat="server" Text="Submit" /></p> <asp:TextBox id="refPage" runat="server" Visible="False" /> </form>
and Finaly...
The Code Behind (vb.net):
ublic Class correction
Inherits System.Web.UI.Page
Protected WithEvents suggestDetails As System.Web.UI.WebControls.CheckBox
Protected WithEvents suggestInformation As System.Web.UI.WebControls.CheckBox
Protected WithEvents suggestTypos As System.Web.UI.WebControls.CheckBox
Protected WithEvents suggestSpeed As System.Web.UI.WebControls.CheckBox
Protected WithEvents suggestOther As System.Web.UI.WebControls.CheckBox
Protected WithEvents suggestText As System.Web.UI.WebControls.TextBox
Protected WithEvents refPage As System.Web.UI.WebControls.TextBox
Protected WithEvents correctionForm As System.Web.UI.HtmlControls.HtmlForm
Protected WithEvents correctionComplete As System.Web.UI.HtmlControls.HtmlContainerControl
Private Const emailTo = "gary@somedomain.co.uk" ' who do we want to send the email to?
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
correctionComplete.Visible = False
If refPage.Text = "" Then
refPage.Text = Request.UrlReferrer.ToString()
If refPage.Text = "" Then
refPage.Text = "not passing"
End If
Else
If Page.IsPostBack() Then
Page.Validate()
If Page.IsValid() Then
' hide the contact form and instructions
correctionComplete.Visible = True
correctionForm.Visible = False
' display the complete label
'lblComplete.Visible = True
Dim mail As New MailMessage
'referer = Request.Url.AbsoluteUri
mail.From = "corrections@somedomain.co.uk"
mail.To = emailTo
mail.Subject = "Someone wants you to check this page:"
'mail.Body = "Link: " & Request.UrlReferrer.ToString() & vbCrLf
mail.Body = "Link: " & refPage.Text & vbCrLf
mail.Body &= "Browser Version: " & Request.Browser.Browser & " " & Request.Browser.Version & " " & Request.Browser.Platform & vbCrLf
mail.Body &= "User Agent:" & Request.UserAgent() & vbCrLf & vbCrLf
mail.Body &= "Browser Javascript: " & Request.Browser.Javascript & vbCrLf & vbCrLf
mail.Body &= "Wrong or incorrect Information: " & suggestInformation.Checked & vbCrLf
mail.Body &= "Typos: " & suggestTypos.Checked & vbCrLf
mail.Body &= "Slow loading: " & suggestSpeed.Checked & vbCrLf
mail.Body &= "Other Problems: " & suggestOther.Checked & vbCrLf & vbCrLf
mail.Body &= "Message Text:" & vbCrLf & suggestText.Text & vbCrLf
mail.BodyFormat = MailFormat.Text
SmtpMail.SmtpServer = ConfigurationSettings.AppSettings("smtpServer")
SmtpMail.Send(mail)
End If
End If
End If
End Sub
End Class
This is Really confusing me - all i can think is that maybe ie isnt passign the referer through... but i simply dont understand how this can be if it is a standard header.....
I would apriciate ANY help with this that people can give me.....

New Topic/Question
Reply




MultiQuote




|