#1
  1. Professional Lay-A-Bout
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2004
    Location
    Ann Arbor, Michigan
    Posts
    302
    Rep Power
    16

    Why won't this short script spawn a window?


    This script will open a window in IE but not in mozilla based browsers (ie mozilla and firefox). Can anyone tell me why?
    Code:
    <SCRIPT type="text/javascript">
    <!-- hide from non supporting browsers
    document.writeln("Splash Page");
    myRef = window.open('trial.html','mywin','left=10,top=10,width=780,height=500,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0');
    
    self.blur();
    
    //   Done hiding from non supporting browsers  -->
    </script>
    directories=0 is spelled correctly in coding. Devshed is inserting a space for some reason.

    Comments on this post

    • crownjewel82 agrees : $rep++ for coding for firefox
    Thomas

    Dogs and computers both do everything you tell them.
    But computers don't like their tummies rubbed.
  2. #2
  3. No Profile Picture
    rebel with a cause
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    May 2004
    Location
    The Batsh!t Crazy State.
    Posts
    5,814
    Rep Power
    3466
    I know it's bluntly obvious but did you check your popup blocker? I've heard of such problems with that particular method.
    Dear God. What is it like in your funny little brains? It must be so boring.
  4. #3
  5. CSS & JS/DOM Adept
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2004
    Location
    USA (verifiably)
    Posts
    20,132
    Rep Power
    4310
    The post parser puts spaces into long lines of code -- it's annoying.

    I agree, it's probably falling victim to the builtin popup blocker.
    Spreading knowledge, one newbie at a time.

    Learn CSS. | PHP includes | HTML Validator | CSS validator

    Remember people spend most of their time on other people's sites (so don't violate web design conventions).
  6. #4
  7. Professional Lay-A-Bout
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2004
    Location
    Ann Arbor, Michigan
    Posts
    302
    Rep Power
    16
    Originally Posted by Kravvitz
    The post parser puts spaces into long lines of code -- it's annoying.

    I agree, it's probably falling victim to the builtin popup blocker.
    That's what it was.

    Thanks for the help!
    Thomas

    Dogs and computers both do everything you tell them.
    But computers don't like their tummies rubbed.
  8. #5
  9. Cunning Linguist
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2003
    Location
    I used to live at home, now I stay at the house
    Posts
    10,166
    Rep Power
    2043
    It's just cos you have a string of more than 50 chars with no white
    space, so the forum adds some in to prevent excessive scrolling.

    You could fix it quite easily by placing a space after one of your ','s.

    Code:
    ,location=0, directories=0,
    Support requests via PM will be ignored!
    Read These: The General Rules Thread | The General FAQ Thread | NEW USERS - How to post a question


IMN logo majestic logo threadwatch logo seochat tools logo