473,394 Members | 1,721 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.

Popups being blocked

dd
I have a scenario where my popups are being blocked
by IE6+ and Firefox. The problem is that although the
popup is a direct result of the user clicking on the link
(meaning that they WANT the popup), when it comes
to opening it, I'm doing it via a JavaScript function and
by the time the popup is opened the browser doesn't
know it was as a result of that click. The link between
click and popup open attempt is broken. The reason
for this is that the click occurs in Flash, and to open
the popup it makes a call out to my JavaScript. The
solution of course is that the Flash itself opens the
popup and that works. We'd prefer it though if the
JavaScript function could open it because it has more
logic in it and does other stuff.

I've noticed a few sites that somehow managed to
get around this problem though. When I looked at
the code they're using to open the popup it just looks
completely standard, like this:

var pop=window.open(url,name,options);
if(pop)pop.focus();

Here's a site that's managing to launch a popup that
isn't from a click:

http://www.peekvid.com/tv.html

In IE6 (with SP2) I see the popup warning bar at the
top of the client area ("popup blocked"), but despite
that, the popup opens anyway (or a second one
manages to open). In Firefox it seems like it gets
blocked, but when you close the browser, the
unload event manages to spawn a popup anyway.

I looked at their code and saw only the code above
along with a lot of obfuscated code that is very hard
to figure out.

Mar 3 '07 #1
4 3253
On 3 mar, 03:57, "dd" <dd4...@gmail.comwrote:
I have a scenario where my popups are being blocked
by IE6+ and Firefox. The problem is that although the
popup is a direct result of the user clicking on the link
(meaning that they WANT the popup), when it comes
to opening it, I'm doing it via a JavaScript function and
by the time the popup is opened the browser doesn't
know it was as a result of that click. The link between
click and popup open attempt is broken. The reason
for this is that the click occurs in Flash, and to open
the popup it makes a call out to my JavaScript. The
solution of course is that the Flash itself opens the
popup and that works. We'd prefer it though if the
JavaScript function could open it because it has more
logic in it and does other stuff.

I've noticed a few sites that somehow managed to
get around this problem though. When I looked at
the code they're using to open the popup it just looks
completely standard, like this:

var pop=window.open(url,name,options);
if(pop)pop.focus();

Here's a site that's managing to launch a popup that
isn't from a click:

http://www.peekvid.com/tv.html

In IE6 (with SP2) I see the popup warning bar at the
top of the client area ("popup blocked"), but despite
that, the popup opens anyway (or a second one
manages to open). In Firefox it seems like it gets
blocked, but when you close the browser, the
unload event manages to spawn a popup anyway.

I looked at their code and saw only the code above
along with a lot of obfuscated code that is very hard
to figure out.
You can use a random name fo the popups so the browser doesnt think
you are using the same popup over and over. Also, we all hate popups,
use popunders insted (absolutly positioned divs that "float" over the
page)

Mar 5 '07 #2
dd
On Mar 5, 1:31 am, "Seth Illgard" wrote:
You can use a random name fo the popups so
the browser doesnt think you are using the
same popup over and over.
The name is effectively random already. I'm
not using the same popup over and over.
There's just one popup.
Also, we all hate popups
It's not popups you hate exactly. It's those
UNWANTED popups you really hate. What I'm
trying to popup is just a new window with
the content that the user requested. It just
so happens that this is also classed as a
popup. The problem is that the browser can't
determine that the user wanted this new window
because the connection with the click they
just did was lost, so now it seems to the
browser like this is an unsolicited popup.

use popunders insted (absolutly positioned
divs that "float" over the page)
I already offer the option of using a floating
div pseudo popup. It's for the people that
don't want to use them, and instead use a new
window that I'm looking for this solution.

FYI - that's not what a popunder is. A pop
under is a popup that auto-blurs itself so
that it's hiding behind your browser window :)

Mar 5 '07 #3
ASM
dd a écrit :
On Mar 5, 1:31 am, "Seth Illgard" wrote:
>You can use a random name fo the popups so
the browser doesnt think you are using the
same popup over and over.

The name is effectively random already. I'm
not using the same popup over and over.
There's just one popup.
tell me the difference between both ... ! ?
What I'm
trying to popup is just a new window with
the content that the user requested. It just
so happens that this is also classed as a
popup. The problem is that the browser can't
determine that the user wanted this new window
because the connection with the click they
just did was lost, so now it seems to the
browser like this is an unsolicited popup.
User can decide to open the popup in a tab
In this case the tab reacts exactly as a popup.
(so do no give a size to the popup)

To use same popup I think you have to do :

function pop(page) {
if(typeof(truc) == 'undefined' ||
!truc ||
truc.closed)
truc = window.open('','truc','menubar=0,location=0,scroll bars=1');
truc.location = page;
truc.focus();
}

While popup isn't closed
the file called is displayed in this window(or tab)
and popup/poptab comes on front
If popup is closed a new popup with same name is oppened.

<a ref="page1.htm" onclick="pop(this.href); return false;">
page 1
</a>

I already offer the option of using a floating
div pseudo popup. It's for the people that
don't want to use them, and instead use a new
window that I'm looking for this solution.
They can click something to give their choice ?

--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
Mar 5 '07 #4
dd
On Mar 5, 11:15 am, ASM <stephanemoriaux.NoAd...@wanadoo.fr.invalid>
wrote:
User can decide to open the popup in a tab
In this case the tab reacts exactly as a popup.
(so do no give a size to the popup)

To use same popup I think you have to do :

function pop(page) {
if(typeof(truc) == 'undefined' ||
!truc ||
truc.closed)
truc = window.open('','truc','menubar=0,location=0,scroll bars=1');
truc.location = page;
truc.focus();

}

While popup isn't closed
the file called is displayed in this window(or tab)
and popup/poptab comes on front
If popup is closed a new popup with same name is oppened.

<a ref="page1.htm" onclick="pop(this.href); return false;">
page 1
</a>
I already offer the option of using a floating
div pseudo popup. It's for the people that
don't want to use them, and instead use a new
window that I'm looking for this solution.

They can click something to give their choice ?
I'm not sure how we got into the issue of popup
name re-using. This isn't relevant to my problem.

I have a JS function in my library which looks
like this (in pseudo code form):

function linkclicked(params) {
if want to navigat in-page
self.location.href = newurl
else
{
popuphandle = window open (params)
if popuphandle indicates popup was blocked and want div
create a div with iframe with src set to newurl
else if in-page allowed on popup blocked
self.location.href = newurl
}
}

As you can see, sometimes the caller of this
function might want to navigate in-page. If
not then they want to open the link in a new
window. One of the parameters indicates whether
navigating to the link in an iframe on a div is
a valid alternative when the popup is blocked.

This function works well enough, I'm just trying
to see if there are any known ways to prevent
the popup being blocked.

The only reason the popup is blocked is because
the click that the user did was inside FLASH.
The Flash made a getURL or FSCommand out to the
JavaScript to tell it to navigate to the URL.

One workaround we have is to NOT make the call
out to the JS function. Instead we open the
popup window directly from inside the FLASH. The
drawback of that is that we lose the extra stuff
that the JS function does (with information that
the FLASH doesn't have access to easily).

Some sites manage to beat the popup blockers and
I'm really looking to find out how they're doing
it.

Mar 6 '07 #5

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

Similar topics

52
by: Harlan Messinger | last post by:
Can you help me figure out what to do about popups? Sometimes we develop web applications where popups make very good sense for precisely the same reasons they make sense in traditional...
1
by: Jim Mitchell | last post by:
I use pop ups as part of my application.... Is there any way to detect if popups are blocked for my site and ... 1) Let the user know to allow popups for this site? Thanks in advance, ...
2
by: Robert Oschler | last post by:
We like to pop-up context help windows when a user clicks on certain terms on our web pages. However, the popup blockers seem to block any links with "target=_new" or "target=_blank". Is there a...
2
by: Tom Szabo | last post by:
Hi, >>IE in Windows XP Service Pack 2 has a popup blocker that blocks unsolicited >>popups >>IE (other than Windows XP Service Pack 2) also has many add-ons (Google toolbar, >>Yahoo! toolbar,...
6
by: Keith Smith | last post by:
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...
7
by: Nigel Molesworth | last post by:
I'm working on a site for a friend. I've found some image popup code that does what I want (borderless, close on exit) but for some reason I occasionally get the "popup blocked" information bar in...
0
by: heathy | last post by:
A puzzle... hmmm, we have firewall software on our laptops so that when the laptop is in 'remote mode', i.e. out of the office, internet explorer is only allowed to go to our company remote...
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...
1
by: Moe Sisko | last post by:
Using : ASP.NET 2.0, IE 7. This is a strange problem with popups not working in IE to remote sites, even though popups are allowed in IE. To reproduce, create web site with two pages,...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.