473,394 Members | 1,703 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,394 software developers and data experts.

how to invoke popup that is not blocked?

How can I invoke a popup that is not blocked? I know it can be done because
I have seen it.

My goal is to pop up an image that has a BLACK background color (not white -
otherwise I could just directly link to the picture file).

Jul 23 '05 #1
6 2618


Keith Smith wrote:
How can I invoke a popup that is not blocked? I know it can be done because
I have seen it.


It depends on the browser configuration, the normal configuration
nowadays is usually to block unrequested popups but to allow requested
ones meaning when the browser users hits a link or a button you can open
your popup e.g.
<a href="whatever.html" target="windowName"
onclick="var win = window.open(this.href, this.target,
'width=400,height=300,scrollbars,resizalbe');
return win != null;">link</a>
--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #2
On 05/05/2005 15:23, Keith Smith wrote:
How can I invoke a popup that is not blocked? [...]
Pop-ups that are requested - indicated by an explicit user action, such
as a mouse click - are /usually/ shown, but some people will block all
pop-ups unconditionally, particularly if they are using a third-party
system (rather than one that's built-in).
My goal is to pop up an image that has a BLACK background color (not white -
otherwise I could just directly link to the picture file).


The only way you will be able to do that is by linking to a HTML file.
The white background is controlled by application or operating system
preferences. A pop-up will not help you.

Mike

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Jul 23 '05 #3
Michael Winter wrote:
On 05/05/2005 15:23, Keith Smith wrote:
(snip)
My goal is to pop up an image that has a BLACK background color (not white - otherwise I could just directly link to the picture file).


The only way you will be able to do that is by linking to a HTML

file. The white background is controlled by application or operating system preferences. A pop-up will not help you.


Michael...how about...

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<script type="text/javascript">

function getHTML()
{
return [
'<body ' ,
'style="background:url(' ,
'http://www.light-speed-web-graphics.com/' ,
'stripes_horiz_darker/fastest_00077.GIF);' ,
'margin:0;cursor:pointer;" ' ,
'onload="document.title=\'...The Rutles !\'" ' ,
'onblur="setTimeout(\'self.focus()\',100)" ' ,
'onclick="self.close()">' ,
'<img src="http://www.rutles.org/rpix/rutles.jpg" ' ,
'style="border:1px #000 solid;margin:16px;">' ,
'</body>'
].join('');
}

function picpop()
{
pop = window.open(
'javascript:opener.getHTML()',
'pop',
'width=566,height=569' +
',left=160,top=80' +
',status=0'
);
}

</script>
</head>
<body>
<button onclick="picpop()">- open me -</button>
</body>
</html>

Not really linking, per se...

Jul 23 '05 #4
In article <W%pee.14926$8e4.8338@trnddc09>, ke*********@verizon.net
enlightened us with...
How can I invoke a popup that is not blocked? I know it can be done because
I have seen it.

My goal is to pop up an image that has a BLACK background color (not white -
otherwise I could just directly link to the picture file).


Modify as desired.
(from my script that opens a help window: tested successfully in MSIE5/6,
Opera 7+, and Gecko/Firefox)

SCRIPT:
var h_window = null;
var h_array = new Array();
/* descriptions that remain constant */
h_array["help"] = "<p>Click on any of the help icons to bring up a javascript
window with relevant information.</p>";
h_array["h_zip"] = "<h1>Zip Code</h1>"+
"<p>Description: The zip code for this office.</p> "+
"<p>Allowable values: 5-digit zip code only, no dashes.
</p>";
/* functions that get called when user presses a help button */
function openHelp(screenName)
{
if (!h_window || h_window == null || typeof h_window == "undefined" ||
h_window.closed || !h_window.document)
h_window = window.open("","Help","height=200,width=
200,scrollbars=yes,resizable=yes");
var doc = h_window.document;
doc.open();
doc.writeln("<html><head><title>Help</title>");
doc.writeln("<link rel='stylesheet' type='text/css'
href='myStylesheet.css'>");
doc.writeln("</head><body>");
doc.writeln(h_array[screenName]);
doc.writeln("</body></html>");
doc.close();
h_window.focus();
return;
}
HTML:
<p> <a href="javascript:openHelp('help')"><img src="help.gif" border="0"></a>
&nbsp; Click any help icon for more information.</p>

--
--
~kaeli~
When a clock is hungry, it goes back four seconds.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #5
On 05/05/2005 17:15, RobB wrote:
Michael Winter wrote:
[Need to use a file]
Michael...how about...
I prefer Mike. :)

[Code that generates HTML]
Not really linking, per se...


For all intents and purposes, it's the same thing but less reliable
(assuming we're dealing with a general audience). You could argue that
the script could be made extensible, but then again so can something
server-side.

My impression is that the OP believes a pop-up can provide the black
background. I'm trying to point out that this isn't the case.

Mike

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Jul 23 '05 #6
Keith Smith wrote:
How can I invoke a popup that is not blocked?
You cannot.
I know it can be done because I have seen it.


You have not seen all.
PointedEars
--
The German psychs, the German authorities, the German secret service agents
are [...] fanatics, they are insane and known of persecuting innocent people
and Scientologists. -- "The only real Barbara Schwarz", dsw.scientology,
<16**************************@posting.google.com >
Jul 23 '05 #7

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

Similar topics

38
by: Shaun McKinnon | last post by:
HI...Here's my problem...I have a popup window that loads when i want it to, but it's not sized properly. I've set the size, but it doesn't seem to work. I've been on 8 different websites to find...
10
by: Agony.COM | last post by:
Hi there all, Is there a way, using Javascript, that you can detect if a popup window has opened successfully? I'm tring to work out if someone is running popup blocking software or not. ...
1
by: MJEASSOC | last post by:
I need some help with closing a popup window. I'm making an online portfolio, that has one base page with text and thumbnails. When a user clicks on a thumb, a new window opens containing a larger...
2
by: amessimon | last post by:
Hi I have a issue where i need to open two popup windows at once. I'm finding this works fine in firefox, IE, and most other browsers, but im getting caught by popup blockers. Paraphrased my...
26
by: Raffi | last post by:
Hi, We have a database application that runs in a popup Internet Explorer application window. The reason for this is to isolate the casual user from the address bar and the typical IE navigation...
15
by: | last post by:
So many websites can get around my Googlebar's popup blockers. Even Opera 8 can not stop those popups. I looked into the codes, and I can find nothing showing me how it is done. Can anyone help me...
13
by: ldan | last post by:
Hi everybody, I would not consider myself an expert in javascript - but so far whatever I know, helped me reaching my goals. Recently I started to experience a lot of javascript errors related...
5
by: Jean Pierre Daviau | last post by:
I have disable my firewall, virus software, google pop up allowed, ie6 popp up checker disabled. Is there an other one? This script tels me : "Pop-up windows are blocked. Please disable your...
2
by: jtaylor | last post by:
I am having a problem with the prompt message being blocked by popup blockers. (I think) I have the following javascript code on my page and some customers are having a problem with the prompt...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.