new window, tabs and forms

Discussion in 'Javascript' started by Andrew Poulos, Jan 14, 2008.

  1. If I call this:

    myWin = window.open("test.htm", "", "");

    I get a new separate window in Firefox but if I try it from a form

    <form action='test.htm' method='post' target='myWin'
    onsubmit="window.open('',this.target,'');return true;">

    I get a new tab. How can I get a new separate window from a form?

    Andrew Poulos
     
    Andrew Poulos, Jan 14, 2008
    #1
    1. Advertisements

  2. On Jan 13, 8:22 pm, Andrew Poulos <> wrote:
    > If I call this:
    >
    > myWin = window.open("test.htm", "", "");
    >
    > I get a new separate window in Firefox but if I try it from a form
    >
    > <form action='test.htm' method='post' target='myWin'
    > onsubmit="window.open('',this.target,'');return true;">
    >
    > I get a new tab. How can I get a new separate window from a form?


    The user's browser preferences should control whether new windows open
    in an actual window or a tab. It seems that Firefox is buggy and that
    certain combinations of attributes in the third argument of
    window.open can trigger an actual new window to open even when the
    user has set their preferences to opening new windows in a tab. Try
    various combinations for the third attribute like the following

    'toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes
     
    Peter Michaux, Jan 14, 2008
    #2
    1. Advertisements

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. =?Utf-8?B?Tm92aWNl?=
    Replies:
    2
    Views:
    6,917
    Alan Ferrandiz Langley
    Jun 9, 2004
  2. Matt
    Replies:
    2
    Views:
    14,566
    bruce barker
    Aug 23, 2004
  3. Matt
    Replies:
    1
    Views:
    604
    Andrew Thompson
    Aug 22, 2004
  4. Matt
    Replies:
    5
    Views:
    3,209
    Michael Winter
    Aug 25, 2004
  5. qwweeeit
    Replies:
    2
    Views:
    832
    qwweeeit
    Dec 14, 2005
  6. rantingrick

    Tabs -vs- Spaces: Tabs should have won.

    rantingrick, Jul 16, 2011, in forum: Python
    Replies:
    95
    Views:
    2,705
    Roy Smith
    Jul 19, 2011
  7. Matt
    Replies:
    3
    Views:
    338
    Bob Barrows [MVP]
    Aug 22, 2004
  8. John Kopanas
    Replies:
    2
    Views:
    492
    Gregory Brown
    Jan 29, 2007
Loading...