PDA

View Full Version : embed lzx in html


mohan
08-26-2003, 08:56 PM
hai Antun,

We plan to design an application using laszlo (lzx) and this application embed lzx in the HTML page.
(it contain 3 elements:Header,lzx Application,footer).Here my doubt is,If i click on the one of the items of the Header (Ex:contact us OR FAQ ,(for these we are using jsp/php) ),
and we want to go back to the main laszlo application where we done some designs before.Here my question is:

Is there any chance of loosing the design what we done priviously when we come back to the lzx application.

2. How do i resize (zoom in and zoom out)the image by clicking on the buttons (+/_).I mean if i click on the
(+) button the image size should increase incrementally.and this also applicable to (-) button.

Thanks
mallesh

antun
08-26-2003, 09:54 PM
Hey Mallesh

There are no APIs to save the "state" of an app so that if you navigate away from it and come back it remembers how it looked before.

If you needed to store some session-related information, you could save that data on the server (for example in a cookie, or a database). You could have the app make a GET request with some details about the state of it based on some user-initiated event.

For example, say the app contains a tabslider (as in the Weather app), and you want to be able to remember which tab was opened. You could have the app send requests to a script on your server that recorded when a tab was opened. HTTP requests in Laszlo are asynchronous, so it would not slow the app at all. Then when the app was started, and fully loaded, you could ask the server if it remembers if any tab was opened.

As for zooming, do you mean a view's resource? You can stretch it by doing something like:


<view name="foo" resource="img.jpg" stretches="both" />

----------

foo.setWidth( foo.width + 10 );
foo.setHeight( foo.height + 10 );


Is that what you meant?

-Antun