SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Evangelist
    Join Date
    May 2005
    Posts
    411
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Why does this Popup Window work in FF but NOT in IE?

    Hey... I can't believe I just found this out... I put this popup on our site months ago... and just found out it doesn't work in IE!!!
    Code:
    <head>
    <script type="text/javascript">
    <!--
    function openWindow(url){
    newWin = open(url,'','height=270,width=467,top=20,left=20,toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,directories=no,status=no' )
    }
    //-->
    </script>
    </head>
    
    <body>
     <a class="link2" href="http://www.domain.com/products/index.htm" onclick="openWindow(this.href) ; return false">Products</a>
    </body>
    What's going on here? This works in FF... but I get a "Page not Found" in IE.

    Thanks.

  2. #2
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,095
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    Hi Gitman,
    Code:
    function openWindow(url){
    alert(url);
    }
    What does this print in IE?

    I would try removing 'newWin =' before the open function
    or adding something like newWin.focus(); after the script.

  3. #3
    SitePoint Evangelist
    Join Date
    May 2005
    Posts
    411
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The popup window works in IE... I should clarify... but the webpage that is suppose to be in the popup is NOT fetched in IE... it is in FF... but in IE you get a "Page not found" message... any idea why?

  4. #4
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,095
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    I asked you first.

  5. #5
    SitePoint Member
    Join Date
    Jul 2007
    Location
    Bangalore
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey,
    I've tested with both Mozilla, and IE-7.
    This program is working fine for me.

    In your case, the site might got down, at that crucial moment.

  6. #6
    SitePoint Evangelist
    Join Date
    May 2005
    Posts
    411
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    kak... does the popup fetch the page in IE for you? The popup shows up in IE... but the page is always "page not found" but I can immediately open FF... and the page is there... so I know it's not the site itself.

    Mark... I have no idea what you asked... what does it print? I don't know anything about .js.

    When you get the Page not found... at the top of the popup window... the url is:

    http://www.domain.com/undefined

  7. #7
    SitePoint Member
    Join Date
    Jul 2007
    Location
    Bangalore
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,
    I'm sending the screen-shots as an attachment to make you sure that I'm getting the page properly. Actually, it happens some times when some problem is there in the installation.

    inIE7 is the .gif screen-shot that I got in IE7.

    inFF is the .gif screen-shot that I got in Mozilla Firefox.

    Regards,
    Ashok Kumar.
    Attached Images Attached Images

  8. #8
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,095
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    Sorry Gtiman,

    The alert() function makes a popup appear and print the variable you give it.
    So adding an alert(url); function within your openWindow function would show you what the value of url is.

    It's very useful for debugging.

    I would also try making your function like this:
    Code:
    function openWindow(url){
      open(url,'','height=270,width=467,top=20,left=20,toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,directories=no,status=no');
    }
    You just want to call the open function - you don't want to save it to a variable.
    Having newWin = open(); means that you run the open command and save it's result in the newWin variable. You don't want to do this.

  9. #9
    SitePoint Evangelist
    Join Date
    May 2005
    Posts
    411
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks everyone for the help... this is bizarre! I have had many people check our website... and they all say the webpage is fetched in the popup window... but I still get a Page Note Found! I have refreshed the popup window.... closed everything... restarted computer... turned off popup blocker just in case... what is going on here? It's so weird.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •