[cl-who-devel] onclick
Stas Boukarev
stassats at gmail.com
Thu Apr 12 14:47:32 UTC 2012
Stas Boukarev <stassats at gmail.com> writes:
> "Haris Bogdanovich" <fbogdanovic at xnet.hr> writes:
>
>> I installed all the libraries (cl-who, parenscript and hunchentoot) properlly
>> with the latest quicklisp but I can't still autocomplete :onclick.
> You shouldn't be able to autocomplete :onclick. Autocomplete in slime
> works only for interned symbols, once you compile the code it will be
> interned and you would see it in the autocompletion. cl-who doesn't
> intern symbols into keyword for it to work.
>
>> If I just write it the program stilll doesn't work.
>> What could be the problem ?
> :onclick should come before the body of <p>, so,
>
> (with-html-output-to-string (*standard-output* nil)
> (:html
> (:head)
> (:body
> (:p :onclick "alert(\"Hello\")"
> "click me"))))
>
> I don't know how parenscript is supposed to work, but (ps (alert
> "hello")) returns "alert('hello');", and cl-who uses #\' to quote
> strings, so it becomes 'alert('hello');', which obviously doesn't work.
(setf ps:*js-string-delimiter* #\") for
(:p :onclick (ps (alert "hello")) "click me")
to work.
--
With best regards, Stas.
More information about the Cl-who-devel
mailing list