PDA

View Full Version : LzBrowser.loadJS usage in validation


av_domain
04-16-2007, 04:32 AM
Hi ,
The following code is not displaying the javascript alert hello though it displays it in the debug console. Could anyone tell me why ? Also , I need examples to retrieve the data from a form and validate through regular expressions ..

Please help....

Thanks ,
Aravind

-----------------------------------------------------------------------------------------------------------------------


<canvas debug="true">
<debug />
<edittext x="40" text="hello" id="captchaText" ></edittext>
<node id="myNode">
<method name="myMethod">
Debug.write('Nice day if it do not rain');
Debug.write(captchaText.text);
LzBrowser.loadJS('alert(captchaText.text)');
</method>
</node>
<script>
myNode.myMethod()
</script>
</canvas>

senshi
04-16-2007, 11:24 AM
Maybe you can spot the difference:


var s = "Hello World!";
Debug.write( s );
LzBrowser.loadJS( "alert(s)" );
LzBrowser.loadJS( "alert( '" + s + "' )" );

av_domain
04-16-2007, 08:39 PM
Thanks - I know it was silly . Hope I can deal with reg exp in the same way - or is there some other way out ?

Rajeshorey
12-08-2007, 03:00 AM
Maybe you can spot the difference:


var s = "Hello World!";
Debug.write( s );
LzBrowser.loadJS( "alert(s)" );
LzBrowser.loadJS( "alert( '" + s + "' )" );


senshi can you help me to resolve this problem

thanks

http://forum.openlaszlo.org/showthread.php?t=11236&highlight=alert+validation