On Mar 5, 11:15 am, ASM <stephanemoriaux.NoAd...@wanadoo.fr.invalid>
wrote:
Quote:
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>
>
Quote:
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.