[parenscript-devel] this.bgcolor
Henrik Hjelte
henrik at evahjelte.com
Mon Jun 21 13:51:32 UTC 2010
On Sun, Jun 20, 2010 at 8:42 PM, Haris Bogdanović <fbogdanovic at xnet.hr> wrote:
> Sorry, I wrote that wrong.
> I want to set background color of td cell like this:
>
> <td onclick='this.bgcolor="blue"'> text </td>
>
> with cl-who and ps like:
>
> (:td :onclick (ps ("what goes here to get 'this.bgcolor="blue"' ? ")))
There are reasons why inline javascript is out of fashion:
http://css.dzone.com/news/why-inline-css-and-javascript-
I suggest setting the onclick handler from outside the html, retrieve
the td element using an id and getelementbyid, or if it is not unique
(an id can't be used) add a class and use some javascript library that
can select elements by classname to get the dom element.
/Henrik Hjelte
More information about the parenscript-devel
mailing list