Solved

create a hidden popup window?

Posted on 2004-09-22
7
2,052 Views
Last Modified: 2012-06-21
Hi,
I am testing the browser to see whether the browser supports popups (thanks to xp sp2!) - have resolved this but quite a ugly window appearing briefly - would like this to be totally transparent to the user and just display a msg if it doesnt work

any ideas?

function check_popup() {
var win = window.open('','','width=1,height=1,scrollbars=no');
if(!win) alert ('*** WARNING: Popups are not enabled ***');
win.close();
}
0
Comment
Question by:carillian
7 Comments
 
LVL 19

Expert Comment

by:peh803
Comment Utility
How about something like this:
  window.open('','','width=1,height=1,scrollbars=no, screenX=5000, screenY=5000');

This way, the popup will execute, but it will do so offscreen...

peh803
0
 
LVL 75

Expert Comment

by:Michel Plungjan
Comment Utility
or not.

minimum size of popups in real browsers is 100x100 to avoid these porn site methods...

Michel
0
 

Author Comment

by:carillian
Comment Utility
nope, that didn't make a difference - the popup window still briefly appears
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 75

Expert Comment

by:Michel Plungjan
Comment Utility
I think you need to live with it...
0
 
LVL 75

Expert Comment

by:Michel Plungjan
Comment Utility
or try


function check_popup() {
var win = window.open('','','width=1,height=1,scrollbars=no');
window.focus();
if(!win) alert ('*** WARNING: Popups are not enabled ***');
win.close();
}
0
 
LVL 25

Accepted Solution

by:
devic earned 500 total points
Comment Utility
window.open('','','width=1,height=1,scrollbars=no, screenX=5000, screenY=5000');

should be:

window.open('','','width=1,height=1,scrollbars=no,left=5000,top=5000');

0
 

Author Comment

by:carillian
Comment Utility
left=5000 and top=5000 works like a charm thanks
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Today I would like to talk about localizing (Internationalization) JavaScript applications. Introduction When creating an application that is going to be used by many people around the globe, it is important to remember that not everyone speak…
In this article, we'll look how to sort an Array in JavaScript, including the more advanced techniques of sorting a collection of records either ascending or descending on two or more fields. Basic Sorting of Arrays First, let's look at the …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now