Solved

create a hidden popup window?

Posted on 2004-09-22
7
2,053 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
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…

910 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

21 Experts available now in Live!

Get 1:1 Help Now