Anne
01-11-2003, 11:12 AM
Laszlo applications can be embedded within your own, larger HTML page.
You can write the application (with the canvas width and height attributes
set
appropriately), as you would normally. Also create the HTML page that will
contain the application, leaving the appropriate amount of space.
Next run the application in a browser window, and look at the source for the
wrapper page that the LPS generates. Copy and paste the entire <object>
tag into your new HTML page, into the space you created for it. Finally
you may have to change the address of the application. Have a look at the
pasted code:-
<param name="movie"
value=" http://localhost:8080/lps-b2/my-apps/myapp.lzx?lzt=swf"/ >
and
<embed src=" http://localhost:8080/lps-b2/my-apps/myapp.lzx?lzt=swf" ...
Notice that the lzx file is referencing localhost? This won't work for
deployment. If the HTML file is in the servlet container's web app, then you
can reference it locally i.e.
<param name="movie" value="./myapp.lzx?lzt=swf"/>
and
<embed src="./myapp.lzx?lzt=swf" ...
That's all there is to it!
Enjoy!
You can write the application (with the canvas width and height attributes
set
appropriately), as you would normally. Also create the HTML page that will
contain the application, leaving the appropriate amount of space.
Next run the application in a browser window, and look at the source for the
wrapper page that the LPS generates. Copy and paste the entire <object>
tag into your new HTML page, into the space you created for it. Finally
you may have to change the address of the application. Have a look at the
pasted code:-
<param name="movie"
value=" http://localhost:8080/lps-b2/my-apps/myapp.lzx?lzt=swf"/ >
and
<embed src=" http://localhost:8080/lps-b2/my-apps/myapp.lzx?lzt=swf" ...
Notice that the lzx file is referencing localhost? This won't work for
deployment. If the HTML file is in the servlet container's web app, then you
can reference it locally i.e.
<param name="movie" value="./myapp.lzx?lzt=swf"/>
and
<embed src="./myapp.lzx?lzt=swf" ...
That's all there is to it!
Enjoy!