PDA

View Full Version : LzBrowser loadURL vs loadJS window.open


monkeytroy
10-05-2007, 11:37 AM
I want to load a new page from my code in a pop-up. When I use

LzBrowser.laodJs('window.open(.... 'width=600,height=500,menubar=yes,toolbar=yes'..

My originating app disappears.

LzBrowser.loadURL works but the new window has no toolbar or address bar.

This is in a dhtml app btw.

Any one have thoughts on how to show a window, keep your existing app and get toolbars and address bars?

monkeytroy
10-05-2007, 01:58 PM
Figured it out.

Added a 1px frame to my html wrapper page and used that as the target for the

loadURL call. That frame then launches the new window and the app is preserved.

monkeytroy
10-09-2007, 03:53 PM
Weeeeee! Around and around I go..

Firefox seems to have a bug when you try and launch a new window from inside an iFrame! YAY!

So my fix ended up looking like this:

In my html wrapper for the OL app:


<iframe src="" name="tinyFrame" height="1px" width="1px"></iframe>


and in the call to open the new page:


jsLoadCommand = "window.open(blah blah blah)";

if (Lz.__BrowserDetect.browser == "Firefox")
LzBrowser.loadJS(jsLoadCommand);
else
LzBrowser.loadJS(jsLoadCommand, "tinyFrame");


weeeee!