On 9/16/06, Max Carlson <[EMAIL PROTECTED]> wrote:
If we could get this API working in _javascript_ we should have all the
ingredients for bidirectional communication - loadJS() can call out of
an application, and lzSetCanvasAttribute(name, value) can call in by
setting a canvas attribute and firing an event.
OK, here's my experience trying out the initial steps you just suggested:
Using firefox 1,5,0,7 under Mac OS X 10.4.7 "Tiger"
1) I copied pasted the HTML from the iframe generated by cliking the DHTML radiobutton when compiling the lzx source; this HTML source I put in a index.html in the my-apps folder. This worked except that the window was consistently reset to minimal width/height. After commenting out the resizing code in the generated iframe, all was fine.
2) I tried to loadJs from a button. Here's my lzx:
<canvas width="600" height="400">
<view layout="axis:y; spacing:5">
<text>Bonjour Laszlo!</text>
<button text="bonjour candide">
<handler name="onclick">
Debug.write("clicked button");
LzBrowser.loadJS("doTestLoadJs()");
</handler>
</button>
</view>
</canvas>
<view layout="axis:y; spacing:5">
<text>Bonjour Laszlo!</text>
<button text="bonjour candide">
<handler name="onclick">
Debug.write("clicked button");
LzBrowser.loadJS("doTestLoadJs()");
</handler>
</button>
</view>
</canvas>
I imported a simple script in index.html, like so:
<script type="text/_javascript_" src="">
The script is supposed to just display an alert.
This didn't work. In Firebug, I get the following error:
There, the code (from Firebug's console) is:
LzBrowser.loadJS=function($1,$2){
this.loadUrl(("_javascript_:"+$1)+";void(0);",$2)
}
Candide
--
Candide Kemmler
3 rue du Bailli - 1000 Bruxelles
mobile:+32485067980
_______________________________________________ Laszlo-dev mailing list [email protected] http://www.openlaszlo.org/mailman/listinfo/laszlo-dev
