Tanmay
08-27-2009, 03:01 AM
I am showing a html page using <html> tag inside a window in Open Laszlo. I want to pass some value from laszlo side to a text control inside the html and vice-versa. How am I going to acheive this..?
Below is the code snippet..
<class name="browser" title="SPELL CHECKER" extends="window" resizable="true" width="420" height="400" visible="false" closeable="true">
<attribute name="textValue" type="string" value=""/>
<view height="100%" width="100%">
<simplelayout spacing="1" axis="y" />
<html name="htmlview" width="400" height="320" visible="true"/>
<button align="center">Ok</button>
</view>
</class>
<browser id="winspellcheck" width="420" height="400" name="objbrowser">
<handler name="onvisible">
if(this.visible)
{
this.searchSubnodes("name","htmlview").setAttribute("src","http:testspell.html");
//this.searchSubnodes("name","htmlview").setAttribute("wmode","transparent");
this.searchSubnodes("name","htmlview").bringToFront();
}
</handler>
</browser>
<view width="100%" height="100%">
<edittext height="200" width="300" multiline="true" name = "spellchk" text="123">
<handler name="onfocus">
winspellcheck.textValue = this.text;
canvas.searchSubnodes('id','winspellcheck').open() ;
</handler>
</edittext>
</view>
Below is the code snippet..
<class name="browser" title="SPELL CHECKER" extends="window" resizable="true" width="420" height="400" visible="false" closeable="true">
<attribute name="textValue" type="string" value=""/>
<view height="100%" width="100%">
<simplelayout spacing="1" axis="y" />
<html name="htmlview" width="400" height="320" visible="true"/>
<button align="center">Ok</button>
</view>
</class>
<browser id="winspellcheck" width="420" height="400" name="objbrowser">
<handler name="onvisible">
if(this.visible)
{
this.searchSubnodes("name","htmlview").setAttribute("src","http:testspell.html");
//this.searchSubnodes("name","htmlview").setAttribute("wmode","transparent");
this.searchSubnodes("name","htmlview").bringToFront();
}
</handler>
</browser>
<view width="100%" height="100%">
<edittext height="200" width="300" multiline="true" name = "spellchk" text="123">
<handler name="onfocus">
winspellcheck.textValue = this.text;
canvas.searchSubnodes('id','winspellcheck').open() ;
</handler>
</edittext>
</view>