473,246 Members | 1,350 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,246 software developers and data experts.

window.open does not work in mozilla

The following code used to popup a window when I used netscape 4.79.
Now I switched to mozilla 1.4 and the window doesn't popup.

function newWindow(newContent)
{
winContent =window.open(newContent,'nextWin','screenX=0,scree nY=20,width=600....);
winContent.focus();
}

....
<a href="javascript:newWindow('foo.html')"
Jul 23 '05 #1
3 1981
In article <c4**************************@posting.google.com >, kaith
says...
The following code used to popup a window when I used netscape 4.79.
Now I switched to mozilla 1.4 and the window doesn't popup.

function newWindow(newContent)
{
winContent =window.open(newContent,'nextWin','screenX=0,scree nY=20,width=600....);
winContent.focus();
}


Have you configured Mozilla to disallow pop-ups?

--
Hywel I do not eat quiche
http://kibo.org.uk/
http://kibo.org.uk/mfaq.php
Jul 23 '05 #2
DU
kaith wrote:
The following code used to popup a window when I used netscape 4.79.
Now I switched to mozilla 1.4
Mozilla 1.7 will be out in a few days. Mozilla 1.4 is already 1 year old.

and the window doesn't popup.
function newWindow(newContent)
{
winContent =window.open(newContent,'nextWin','screenX=0,scree nY=20,width=600....);
top and left are supported by NS 7.x, Mozilla 1.x, MSIE 5+, Opera 7.x
while screenX and screenY are only supported by NS 4+ and Mozilla.
winContent.focus();
This winContent.focus() call is unneeded and illogical. You should
instead verify/test if the popup exists and is not closed and if so,
then bring it back on top.
}

....
<a href="javascript:newWindow('foo.html')"


Make sure you have javascript support enabled.

If you code that way, by resorting to the "javascript:" pseudo-protocol,
Mozilla users won't be able to use Ctrl+click on the link to open in a
tab nor use Ctrl+Enter or Middle-click to open in a new tab. They won't
be able to open the link in other ways by choosing from their context
menu since the browser no longer sees the href value as a valid href
resource.
Finally, using "javascript:" pseudo-protocol is bad for a last reason:
nothing happens if javavscript support is disabled or non-existent:
about 5%-10% of people on the web surf without javascript support enabled.

http://jibbering.com/faq/#FAQ4_24

Top Ten Web-Design Mistakes of 2002
6. JavaScript in Links
http://www.useit.com/alertbox/20021223.html

"
Don't use javascript: URLs
Using a straight http: URL will allow any browser to access the link. If
you want to use JavaScript for browsers that have JavaScript enabled,
use the onMouseOver and onClick attributes of the <a href> tag.
"
http://www.panix.com/~aahz/javascript.html#remove

DU
Jul 23 '05 #3
kaith wrote:
The following code used to popup a window when I used netscape 4.79.
Now I switched to mozilla 1.4 and the window doesn't popup.

function newWindow(newContent)
{
winContent =window.open(newContent,'nextWin','screenX=0,scree nY=20,width=600....);
winContent.focus();
}
Unless you have disabled JavaScript popups in Mozilla 1.4, it would be
helpful if you posted all window features you have specified with the
third argument of window.open().
...
<a href="javascript:newWindow('foo.html')"


<http://jibbering.com/faq/#FAQ4_24>
PointedEars
Jul 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jawahar Rajan | last post by:
All, I have a printer friendly page that is opened when a user clicks a link on my page to get the printer friendly version, How ever when they close out the printer friendly version and return to...
2
by: Rob | last post by:
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,...
9
by: Justin Koivisto | last post by:
Is there a way to create an alert-like message box that uses a custom image? Basically, I want to replace the default ! image with something else. -- Justin Koivisto - spam@koivi.com PHP...
13
by: Kai Grossjohann | last post by:
It seems that Ctrl-N in Mozilla opens a new empty browser window. That's fine, I don't need to do anything about it. But Ctrl-N in IE appears to clone the current window. Is there a way to...
5
by: Mike | last post by:
In my previous post, I wrote: > ... > GOAL: (very simple) Provide a hyperlink which, when clicked, > calls a javascript function which opens a new URL. > ... > PROBLEM: The following code...
8
by: Dominic Tocci | last post by:
I'm searching for a way to use window.open on my web page to open a window in firefox that allows the sidebars to work (bookmarks, history, etc). When I use the following: var...
14
by: D. Alvarado | last post by:
Hello, I am trying to open a window containing an image and I would like the image to be flush against the window -- i.e. have no padding or border. Can I make this happen with a single call to a...
29
by: wayne | last post by:
Hey there... I'm having some problems passing url parameters with an open.window command. I'm not terribly familiar with java script but here is the code below. When executed it opens the...
13
by: tochiromifune | last post by:
Hello The window.open method brings my window to the top only if it is new. If it's being reused, the window does not come to the foreground (with IE 6 it does). Is there a new way in...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.