LzView.setBGColor() takes a Number, not a String.
And someview.getAttribute("bgcolor") returns a value of the proper type -
>foo.getAttribute("bgcolor")
>3364198
>typeof foo.getAttribute("bgcolor")
>"number"
In Javascript, numbers can be
* decimal - by default
* octal - numbers entered prefixed with a zero - "010" is octal 10 which is
decimal 8
* hexadecimal - numbers entered with "0x" - "0x10" is hexadecimal 10 which is
decimal 16
HTH,
-e
On Fri, 6 Jan 2006, Tim Patsch wrote:
> Code like this doesn't work because the color value returned is in a decimal
> format. The setBGColor() method wants hex.
>
> var clr = someview.getAttribute("bgcolor");
> someview.setBGColor(clr);
>
> Is there any way setBGColor() can be made to take a decimal?
> --
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.1.371 / Virus Database: 267.14.11/219 - Release Date: 1/2/2006
>
> _______________________________________________
> Laszlo-user mailing list
> [email protected]
> http://www.openlaszlo.org/mailman/listinfo/laszlo-user
>
_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user