Thanks for the reply ... I think I wasn't clear on what I'm trying to do ...
let me try again ...
If I've opened a PWC window with a URL, I want to either close it
automatically before opening another
window with a different URL OR I want to use the same window with new
content.
Below is the code I tried to use to reload the opened PWC window with a new
URL ... but the error I get is that win.setUrl is not a function.
var win; // global variable
function displayWindow(url) {
if (win == undefined) {
win = new Window('window_id', {className: "spread", title: "", top:
findScrollTop() + 70, left:10, width: myWidth-40, height: myHeight-110,
resizable: false, maximizable: false, minimizable: false, url: url});
}
else {
win.setUrl(url);
}
win.setDestroyOnClose();
win.show();
}
To get an idea of what I'm trying to do. see my website:
http://www.joepolitico.com
I want the links to come up in a PWC window.
Thanks again.
On 2/11/07, Abel Braaksma <[EMAIL PROTECTED]> wrote:
mortsahl wrote:
>
> 1) If I have a PWC window open, displaying the contents of a URL, and
> I want to open another one,
> how can I have the first automatically close? I tried something like
> the following with no success ...
>
> var win = new Window( ....);
> if (win != undefined) {
> win.destroy();
> }
>
> That didn't work. What will?
The code you display above does little: what you say is: create a
window, and if it is created, destroy it. I don't believe that is what
you want.
Simply take the onOpen handler of the PWC window that is opened (there
are samples on the website) and let it close (any other) windows that
are open.
Or, if all you want to do is display a new website contents, just
replace the contents of the currently open window.
>
> 2) If I open a PWC window to display the contents of a URL, if that
> URL contains popups, I get them.
> I'm using Firefox 2.0 and have Firefox set to block popups -- it does,
> but PWC still lets them through.
> How can the popups be blocked?
This is a bug in Firefox, not in PWC. Popups are blocked by means of
user settings, far beyond the reach of any javascript. If, however an
IFrame contains popups, Firefox thinks it is "trusted" (which is quite
ok, but not completely so), and allows popups. PWC uses IFrames (there
is no other way) q.e.d.
If you want popups blocked properly: stick to Opera, the only browser I
know of that brings popup blocking to the next level.
Technically it is possible (depending on security settings of the user)
to override the javascripts contained in websites contained in IFrames.
However, I doubt there is very much of use case for this (and it is very
complex to block popups this way, if not next to impossible, and
definitely not feasible).
>
> 3) Sometimes, when I open a PWC window to display a URL, the window
> starts to open (I'm using
> spread), the outline of the PWC window is displayed, then the URL is
> opened in a full browser window.
> What's causing this to happen?
I suspect a script on the website that you are calling, which is able to
identify that it is loaded inside a frame and automatically breaks out
of it. Again, out of your reach (or you must call the guys of the other
website).
Cheers,
-- Abel
_______________________________________________
Javawin mailing list
[email protected]
http://mail.xilinus.com/mailman/listinfo/javawin_xilinus.com
_______________________________________________
Javawin mailing list
[email protected]
http://mail.xilinus.com/mailman/listinfo/javawin_xilinus.com