How to open window across browsers

Discussion in 'Javascript' started by ipellew@pipemedia.co.uk, Jul 13, 2006.

  1. Guest

    Hi;

    Any one point me to why this js fragment

    help_win = window.open('try_01_help.html','Exam Questions Help'
    ,'width=650,height=800,dependent=yes, top=10,
    left=10');

    fails in Explorer. Is OK in Firefox etc.

    Regards
    Ian
     
    , Jul 13, 2006
    #1
    1. Advertising

  2. web.dev Guest

    wrote:
    > Hi;
    >
    > Any one point me to why this js fragment
    >
    > help_win = window.open('try_01_help.html','Exam Questions Help'
    > ,'width=650,height=800,dependent=yes, top=10,
    > left=10');
    >
    > fails in Explorer. Is OK in Firefox etc.
    >
    > Regards
    > Ian


    For the window.open() method, the second argument expects a string to
    specify the name of a window. Not to be confused with the name that
    appears on the title bar of the browser.

    The name value is used for the TARGET attribute, for example an <A>
    tag. However, it should not contain spaces. Removing the spaces for
    the window name fixes your problem.

    window.open("try_01_help.html", "Exam_Questions_Help", ...etc...);
     
    web.dev, Jul 13, 2006
    #2
    1. Advertising

  3. Randy Webb Guest

    web.dev said the following on 7/13/2006 2:54 PM:
    > wrote:
    >> Hi;
    >>
    >> Any one point me to why this js fragment
    >>
    >> help_win = window.open('try_01_help.html','Exam Questions Help'
    >> ,'width=650,height=800,dependent=yes, top=10,
    >> left=10');
    >>
    >> fails in Explorer. Is OK in Firefox etc.
    >>
    >> Regards
    >> Ian

    >
    > For the window.open() method, the second argument expects a string to
    > specify the name of a window. Not to be confused with the name that
    > appears on the title bar of the browser.
    >
    > The name value is used for the TARGET attribute, for example an <A>
    > tag. However, it should not contain spaces. Removing the spaces for
    > the window name fixes your problem.
    >
    > window.open("try_01_help.html", "Exam_Questions_Help", ...etc...);
    >


    There are no spaces allowed in the third parameter to window.open
    either. IE will do some strange things when there are, including
    ignoring anything after the space or all of it entirely.

    --
    Randy
    comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
    Temporarily at: http://members.aol.com/_ht_a/hikksnotathome/cljfaq/
    Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
     
    Randy Webb, Jul 13, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. dorayme
    Replies:
    4
    Views:
    529
    dorayme
    Mar 17, 2005
  2. Andy Dingley
    Replies:
    4
    Views:
    389
    Martin Geisler
    Sep 18, 2005
  3. El Kabong

    Browsers, browsers! Quo vadis?

    El Kabong, May 11, 2007, in forum: HTML
    Replies:
    23
    Views:
    924
    dorayme
    May 13, 2007
  4. Burke Libbey
    Replies:
    1
    Views:
    977
    Burke Libbey
    Jul 20, 2007
  5. Jonathan

    Reading cookies across browsers

    Jonathan, Aug 8, 2003, in forum: Javascript
    Replies:
    1
    Views:
    82
    Charles Banas
    Aug 8, 2003
Loading...

Share This Page