Solved

create a hidden popup window?

Posted on 2004-09-22
7
2,055 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
ID: 12123784
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
ID: 12124576
or not.

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

Michel
0
 

Author Comment

by:carillian
ID: 12124592
nope, that didn't make a difference - the popup window still briefly appears
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
LVL 75

Expert Comment

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

Expert Comment

by:Michel Plungjan
ID: 12124733
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
ID: 12148912
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
ID: 12149485
left=5000 and top=5000 works like a charm thanks
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to create and access 2-dimensional arrays in JavaScript.  It includes a tutorial in case you are just trying to "get your head wrapped around" the concept and we'll also look at some useful tips for more advanced programmers. …
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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…

825 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