whats going on? asp.net working in ff1 not ie6

same script/same page/different browser

Page 1 of 1

10 Replies - 6342 Views - Last Post: 04 May 2005 - 05:20 AM Rate Topic: -----

#1 munchkin  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 22-April 05

whats going on? asp.net working in ff1 not ie6

Posted 26 April 2005 - 09:24 AM

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
<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.....

Is This A Good Question/Topic? 0
  • +

Replies To: whats going on? asp.net working in ff1 not ie6

#2 Amadeus  Icon User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 248
  • View blog
  • Posts: 13,507
  • Joined: 12-July 02

Re: whats going on? asp.net working in ff1 not ie6

Posted 26 April 2005 - 09:52 AM

Can you post the actual error...it would save time setting up the page...
Was This Post Helpful? 0
  • +
  • -

#3 munchkin  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 22-April 05

Re: whats going on? asp.net working in ff1 not ie6

Posted 27 April 2005 - 02:31 AM

the error

Server Error in '/' Application.
--------------------------------------------------------------------------------

Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
manchester.correction.Page_Load(Object sender, EventArgs e) +112
System.Web.UI.Control.onload(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +750




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032





hope this helps
Was This Post Helpful? 0
  • +
  • -

#4 Amadeus  Icon User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 248
  • View blog
  • Posts: 13,507
  • Joined: 12-July 02

Re: whats going on? asp.net working in ff1 not ie6

Posted 27 April 2005 - 03:19 AM

Well, it sort of helps...that's an error you get when you try and use an object that has not been instantiated with the new keyword (in .NET, you have to instantiate all objects). I'm running out the door, so I can't see which one right off hand...I'm surprised it's only happening in one browser, though....
Was This Post Helpful? 0
  • +
  • -

#5 munchkin  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 22-April 05

Re: whats going on? asp.net working in ff1 not ie6

Posted 27 April 2005 - 03:23 AM

Yeah thats the bit thats confusing me - I have however found that it is definataly because the variable for the referer isnt being created/passed cause if i fill the variable myself - it works??

doesnt ie pass the referer through popups????
Was This Post Helpful? 0
  • +
  • -

#6 munchkin  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 22-April 05

Re: whats going on? asp.net working in ff1 not ie6

Posted 28 April 2005 - 10:33 AM

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?
Was This Post Helpful? 0
  • +
  • -

#7 Amadeus  Icon User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 248
  • View blog
  • Posts: 13,507
  • Joined: 12-July 02

Re: whats going on? asp.net working in ff1 not ie6

Posted 28 April 2005 - 10:47 AM

How about sending it as a hidden form field?
Was This Post Helpful? 0
  • +
  • -

#8 munchkin  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 22-April 05

Re: whats going on? asp.net working in ff1 not ie6

Posted 28 April 2005 - 10:54 AM

can i do that using a normal link that opens a javascript popup?
Was This Post Helpful? 0
  • +
  • -

#9 skyhawk133  Icon User is offline

  • Head DIC Head
  • member icon

Reputation: 1876
  • View blog
  • Posts: 20,284
  • Joined: 17-March 01

Re: whats going on? asp.net working in ff1 not ie6

Posted 28 April 2005 - 10:55 AM

You can submit a form using a javascript, I believe it's just onclick="submit();"

Didn't read the entire thread so not sure if that's what you're looking for :(
I'm such a slacker.
Was This Post Helpful? 0
  • +
  • -

#10 munchkin  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 22-April 05

Re: whats going on? asp.net working in ff1 not ie6

Posted 03 May 2005 - 02:24 AM

Arrg this is really starting to get to me now....

ok lets try another way - how would i pass a variable through the javascript popup?

using the code ive got simply pass a ?var=######## - I know this will solve the problem...
Was This Post Helpful? 0
  • +
  • -

#11 munchkin  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 22-April 05

Re: whats going on? asp.net working in ff1 not ie6

Posted 04 May 2005 - 05:20 AM

Solved the problem now by passing the addr through as a variable in the javascript and then reading the querystring :)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1