Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    May 2006
    Posts
    51
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Internet Explorer window.open working in ff but not ie

    Hi, I have some code which is supposed to open a new window to preset settings, and it does this perfectly in ff but not at all in ie.

    The code is:
    Code:
    	var settings= ("width=620,height=420,directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=no");
    	window.open("map.html", "How to find us", settings);
    ie(7) says that the second line is an invalid argument.

    I've checked and the page is valid html.

    Anyone know why this might be happening?

    Thanks, Flic

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    And it is. Names can't have spaces in them. This line
    Code:
    window.open("map.html", "How to find us", settings);
    should be
    Code:
    window.open("map.html", "How_to_find_us", settings);
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    New Coder
    Join Date
    May 2006
    Posts
    51
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by _Aerospace_Eng_ View Post
    And it is. Names can't have spaces in them. This line
    Code:
    window.open("map.html", "How to find us", settings);
    should be
    Code:
    window.open("map.html", "How_to_find_us", settings);
    Gah! I'm so stupid! Of course! I've come up with this problem before but had forgotten all about it!

    Thank you!

    Any idea why ff let me do it though? It sounds like neither of them should have!

  • #4
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    I guess FF just reads it as a title or something and because its in quotes it reads it as a whole string where as IE reads each word as a seperate string.
    ||||If you are getting paid to do a job, don't ask for help on it!||||


  •  

    Posting Permissions

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