PDA

View Full Version : reading in params from page?


whisperstorm
09-24-2003, 11:37 AM
Is there a mini-example somewhere of how to pass in parameters to an lzx via the embed call? I want to create an app which others can use and modify via URL params which can be changed in the wrapper HTML that embeds the lzx.

antun
09-24-2003, 11:44 AM
Well, your app will read whatever CGI GET variables were passed to the HTML wrapper page, using the getInitArg() method of the LzBrowser service. There's a Tip on that here:

http://www.laszlosystems.com/developers/community/forums/showthread.php?s=&threadid=139

-Antun

whisperstorm
09-24-2003, 12:37 PM
ok what about the param settings via the object tag? I know I'm probably asking a painfully obvious question...

antun
09-24-2003, 12:47 PM
There isn't a way of using the <param> property of the object tag. What you can do is to add request parameters to the app in the object tag:

myfile.lzx?lzt=swf&foo=bar

... (note you have to do this in 2 places) and you should be able to access foo in your LZX:


<canvas debug="true">
<button>
<method event="onclick">
debug.write( "foo is: " + global.foo );
</method>
</button>
</canvas>


However this is not recommended or supported at all, and may not work in future releases of the LPS!

Take care,

Antun

whisperstorm
09-24-2003, 01:20 PM
:) Understood.