View Full Version : OL Window with URL
Chas2002
09-29-2009, 07:11 AM
Hi,
How would i program a 300x300 window (loaded with a url, www.google.com for example) oninit within the OL canvas. I would like the window to open without pressing a button or anything.
|--------------------|
| canvas text etc |
| |
| |---------| |
| | 300x300 | |
| | window | |
| |---------| |
| |
|--------------------|
Thanks,
Chas
Markus
09-29-2009, 07:17 AM
You should be able to use the <html> component for that. Check out the documentation:
http://www.openlaszlo.org/lps4.5/docs/reference/lz.html.html
Chas2002
09-29-2009, 12:24 PM
Thanks Markus,
That seemed to work but after compiling and moving to my server all I see is a blue background - I don't see the google page?
Chas
Chas2002
09-29-2009, 01:31 PM
Man,
The suggestion Markus gave almost works. In the compile window I see a large blue screen but below where it says Runtime Target - I can see the google screen.
I compiled as swf8, deployed as solo and uploaded the .sfw8 to my server but all I see is a blue screen - it don't see the google page...
What am I missing?
Thanks
Chas2002
09-29-2009, 07:07 PM
Okay,
I've tried everything I can think of and still do not see the url page when I compile and load to the server - I just see a blue screen where the web page should be.
I do see the webpage at the bottom of the compile screen in OL 4.0.11.
Any help would be greatly appreciated.
Thanks,
Chas
Chas2002
09-30-2009, 05:36 AM
Well, since that did not work - i tried <view> with a player and play="true" now I'm getting Conversion Error - can't guess the mime-type.
Did a search in the forums for that error - and while people have seen the error before - no one has suggested a solution.
Back to the drawing board. If anyone has a suggestion about the mime-type or the google url issue above - it would be greatly appreciated.
Thanks,
Chas
Markus
09-30-2009, 06:10 AM
I'm not sure what you are trying to do with the view and player bit. The <html> approach your taking is propably not working due to a z-order problem. By default flash (and other plugins) have a higher z-order. Meaning they are lying on top of the rest of the content. To get around this you need to raise the z-order of the iframe and lower the z-order of the laszlo flash file. Did you remember to set the wmode to transparent as it states in the documetation? Because without that setting flash content will never be able to be placed below your iframe. The fact that you could see the google page at the bottom near the debug bar kind of proves it. The purple bar is regular html and not flash content.
I tried the html component myself in an older version of laszlo and couldn't get it to work. I ended up adding the iframe, css and swf embedding code to my wrapper page by hand. A current version of OL should do better.
Chas2002
09-30-2009, 06:19 AM
Hi Markus,
When I compile - I only need (can use) the compiled .swf. I was hoping to have the google type url embedded within the flash without any object settings. Is that possible?
The reason I can't use any parameter setting is because I launch OL compiled swf in a 'lightbox' and the lightbox will not accept any parameters - just the url to the .swf on my server.
Thanks
Markus
09-30-2009, 06:25 AM
Without the wmode setting on the swf embed code it will not work I'm affraid. I don't know if this is an option for you or not but if you can compile laszlo to DHTML you wont be working with swf making it easier to overlay other content.
This is a general flash <-> HTML / Webbrowser issue. Not an OL issue :(
Chas2002
09-30-2009, 06:28 AM
Thanks,
Yes, I've tried to compile to DHTML and the OpenLaszlo compiler (openlaszlo splash screen) opens but it stays that way forever - it never seems to finish.
So without the wmode, I'm kind of stuck. I'll look for a alternative to lightbox - one that allows me to pass object parameters.
Thanks for your help,
Chas
Chas2002
09-30-2009, 06:39 AM
I tried the DHTML again and I see "Runtime Target: dhtml" along with script size but the browser never does anything else - it just sits there and usually locks up.
Markus
09-30-2009, 08:13 AM
If you get stuck on the splash screen there is propably a javascript error stopping execution. A big difference between an error in a flash app and dhtml is that an error actually halts the browser. Don't know if you ran it in debug mode or not but there should be an error there. If not try something like firebug (firefox only developer plugin) to see whats going on. Also for DHTML you really should try the very latest version of OL as it's still actively being improved.
Chas2002
09-30-2009, 08:55 AM
Thanks again Markus,
BTW - (Just in case you had an idea). I'm really just trying to include the following into OL Canvas: (It's an ad campaign).
<script type="text/javascript" src="http://objects.tremormedia.com/embed/js/embed.js"></script>
<script type="text/javascript" src="http://objects.tremormedia.com/embed/js/4abcd0747b4a3_p.js"></script>
<script type="text/javascript" src="http://objects.tremormedia.com/embed/js/banners.js"></script>
<script type="text/javascript">
var event=new Object;
event["type"]="compAd";
event["callback"]=displayCompanionBanners;
tmObj.register(event);
tmObj.start("4abcd0747b4a3");
function displayCompanionBanners(banners) {
tmDisplayBanner(banners, "adCompanionBanner", 300, 250);
}
</script>
I thought it would be easiest to save the above as a dummy html - then reference the html using your google suggestion. Now that I think about it - is it possible to just "include" the above script as [CDATA] or something?
Thanks,
Chas
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.