PDA

View Full Version : Doubt in a code


Anusha
03-18-2004, 02:17 AM
Hi,
As of given code

<canvas width="500" height="80">
<class name="SpecialButton" extends="button" onclick="changeLabel()">
<method name="changeLabel">
this.setAttribute('label', 'Clicked! ');
</method>
</class>
<SpecialButton>Not clicked</SpecialButton>
</canvas>
on click,the label of button should get changed to "Clicked" but that's not happening.It's not getting changed to clicked, it remains the same..can anybody give me the solution/explanation plz????.

Thanks in advance

Regards
Anush

thipperudra
03-18-2004, 03:37 AM
Hi Anusha,


<canvas width="500" height="80">
<class name="SpecialButton" extends="button" onclick="changeLabel()">
<method name="changeLabel">
this.setAttribute('text', 'Clicked! ');
</method>
</class>
<SpecialButton>Not clicked</SpecialButton>
</canvas>

The above code is working good,i think lps-2.0 is not support 'label' attribute. so i changed label to 'text' attribute.

-Rudresh