Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Opening new window in Mozilla

Reply
Thread Tools

Opening new window in Mozilla

 
 
Rob
Guest
Posts: n/a
 
      09-09-2003
Why does the following code NOT work in Mozilla, but it DOES in IE
(for Mac) and Safari?

<a href="somepage.html" onClick="window.open('somepage.html',
'SomeWindowTitle', 'width=790,height=560, scrollbar=auto,
menubar=no');">Enter</a>

Please help...thanks
 
Reply With Quote
 
 
 
 
Janwillem Borleffs
Guest
Posts: n/a
 
      09-09-2003

"Rob" <> schreef in bericht
news: om...
> Why does the following code NOT work in Mozilla, but it DOES in IE
> (for Mac) and Safari?
>
> <a href="somepage.html" onClick="window.open('somepage.html',
> 'SomeWindowTitle', 'width=790,height=560, scrollbar=auto,
> menubar=no');">Enter</a>
>
> Please help...thanks


Works in my copy (Mozilla v1.4), but is the following not what you really
want?

<a href="somepage.html" target="SomeWindowTitle"
onClick="window.open('','SomeWindowTitle',
'width=790,height=560,scrollbar=auto,menubar=no'); ">Enter</a>

P.S.: Watch for spaces in the window properties, they shouldn't be present.


JW



 
Reply With Quote
 
 
 
 
DU
Guest
Posts: n/a
 
      09-10-2003
Rob wrote:

> Why does the following code NOT work in Mozilla, but it DOES in IE
> (for Mac) and Safari?
>
> <a href="somepage.html" onClick="window.open('somepage.html',
> 'SomeWindowTitle', 'width=790,height=560, scrollbar=auto,
> menubar=no');">Enter</a>
>
> Please help...thanks


As coded, your link will not open a requested popup if javascript is
disabled. As coded, your link will create a popup and then load the
referenced resource in the opener too. As coded, the popup will exceed
the available space for application in MSIE, Mozilla and Opera browsers
so error compensation/correcting functions will need to spend time, cpu
to render the window within the os-workarea for applications.

<a href="somepage.html" target="SomeWindowTitle"
onclick="window.open(this.href, this.target,
'width=600,height=500,scrollbars=yes,resizable=yes ,status=yes'); return
false;">Enter</a>

will open a popup window in all browsers under normal conditions. Note
that scrollbar=auto will not be honored in MSIE 5+, Mozilla, NS 6+ and
Opera 7. It must be scrollbars=yes. And you must make sure there is no
blank space in the 3rd argument string list.

DU
--
Javascript and Browser bugs:
http://www10.brinkster.com/doctorunclear/
- Resources, help and tips for Netscape 7.x users and Composer
- Interactive demos on Popup windows, music (audio/midi) in Netscape 7.x
http://www10.brinkster.com/doctorunc...e7Section.html

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows Media opening outside Mozilla not in a Mozilla Window Jim Firefox 3 12-17-2005 02:00 AM
Opening a new browser window to a specific size without the menu bar and address window. UJ ASP .Net 2 06-27-2005 08:21 PM
opening new window in one window using Tkinter -- Help please Clara Python 6 04-25-2005 03:09 AM
Closing child window when opening a new Window Patrick Olurotimi Ige ASP .Net 2 12-14-2004 04:59 AM
Browswer Window moving when opening a new window Allan Javascript 1 08-05-2004 11:13 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57