Why does my corrections/bugs page work in Firefox and not in IE6?? (asp.net/vb.net)
Im completly lost on this one...
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
Code:
<a href="javascript:correction();">report the problem</a>
javascript code: - just a simple popup
Code:
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');");
}
but once the window has popped up in firefox it loads the form - in ie it just shows a server error :S
The popups Form:
Code:
<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):
VB Code:
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 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.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 passing 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.....
Re: How can my corrections/bugs page work in Firefox and not in IE6?? (asp.net/vb.net)
Your post is kind of confusing... first you say it works in ie, then it doesn't work in IE, but works in Firefox, but your subject asks how to make it work in Firefox?
So... you should first state which isn't working.
Re: Why does my corrections/bugs page work in Firefox and not in IE6?? (asp.net/vb.net)
Sorry about that - I have eddited the post accordingly so that it makes abit more sence....
I need it to work in both ie and firefox and the form wont load up in ie (although the popup window shows up...)
-------------------------------
I have however found that it is definataly because the variable for the referer, it isnt being created/passed cause if i fill the variable myself - it works??
doesnt ie pass the referer through popups????
Re: Why does my corrections/bugs page work in Firefox and not in IE6?? (asp.net/vb.net)
Right Ive done some searching around and Ive found out that it is an issue with IE6sp1+ and/or Firewalls.......
but i still need to find a way around this, Is there any way that we can achieve this either through the .net session or as an address string variable?