PDA

View Full Version : Passing values from calling HTML


barry
11-20-2003, 11:07 AM
I have a server side application that embeds a LPS app within a larger page. I'm using the Weather App as I'm just getting started. I have LPS installed on port 8080 (tomcat) and my other app running on a separate server at 8840. My large app is a JSP page that needs to pass the session id and URL to the LZX app so that the LZX can correctly return to larger app to retrieve some data.

I need to:
1: pass a parameter through the <OBJECT> tag in the JSP page
2: set the <dataset>'s src attribute to the passed value

Is this possible?
B

antun
11-20-2003, 11:13 AM
Yes, I belive you can use the getInitArg() method of LzBrowser:

http://www.laszlosystems.com/developers/learn/documentation/lzxref/lzbrowser.php#meth-getInitArg

... to retrieve the parameter. You'll need to write it after the ?lzt=swf.

As for setting the src attribute of a <dataset> at runtime, there's a tip of the week on that here:

http://www.laszlosystems.com/developers/community/forums/showthread.php?s=&threadid=452&highlight=dataset+src

-Antun

barry
11-20-2003, 11:43 AM
This worked. Here's the code from the LZX file. It was even simpler than the note:

<script>
var session = LzBrowser.getInitArg('returnsession');
var profileurl = "http://localhost:8840/webapp/data.jsp;jsessionid="+session;
</script>
<dataset name="profiledata" autorequest="true"
type="http" src="${profileurl}"/>