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. Advertising

  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. 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. =?Utf-8?B?TmljayBQb3VsaXM=?=

    Forms in Modal IE Window create a new window on postback!

    =?Utf-8?B?TmljayBQb3VsaXM=?=, Jun 2, 2005, in forum: ASP .Net
    Replies:
    5
    Views:
    3,934
    Jeffrey Todd
    Jun 3, 2005
  2. qwweeeit
    Replies:
    2
    Views:
    637
    qwweeeit
    Dec 14, 2005
  3. Mufasa
    Replies:
    1
    Views:
    405
    David R. Longnecker
    Jun 28, 2007
  4. rantingrick

    Tabs -vs- Spaces: Tabs should have won.

    rantingrick, Jul 16, 2011, in forum: Python
    Replies:
    95
    Views:
    1,802
    Roy Smith
    Jul 19, 2011
  5. John Kopanas
    Replies:
    2
    Views:
    268
    Gregory Brown
    Jan 29, 2007
Loading...

Share This Page