PDA

View Full Version : Accessing CGI GET variables from the query string


antun
03-18-2003, 10:16 AM
It's fairly easy to access the GET CGI variables from LZX. You use the the LzBrowser service's getInitArg method:


<canvas debug="true">
<script>
var wookieName = LzBrowser.getInitArg( 'wookie' );
debug.write( "The Wookie's Name: " + wookieName );
</script>
</canvas>


In this case we could append a querystring to the URL as follows:-

?wookie=Chewie

Just be careful when naming the variables. Don't name them "bgcolor", "canvas", or any reserved word in the global namespace.

Enjoy!