From: Haris Bogdanovi� on 20 Jun 2010 18:39 I have this piece of code: (:td :onclick (cl-who:escape-string (ps:ps (setf this.style.background-color (random #xffffff)))) How do I tell lisp that above random is a standard lisp function so that it is not coverted to javascript code but plain random number ? I guess I have to escape somehow from javascript generation to normal lisp expression evaluation ? If I evaluate *package* variable I get COMMON-LISP-USER (lispworks). Do I maybe have to prefix random with COMMON-LISP-USER like COMMON-LISP-USER:random ? Thanks
From: Jorge Gajon on 20 Jun 2010 22:05 On 2010-06-20, Haris Bogdanovi� <fbogdanovic(a)xnet.hr> wrote: > I have this piece of code: > > (:td :onclick (cl-who:escape-string > (ps:ps (setf this.style.background-color (random #xffffff)))) > > How do I tell lisp that above random is a standard lisp function so that it > is > not coverted to javascript code but plain random number ? > I guess I have to escape somehow from javascript generation > to normal lisp expression evaluation ? > If I evaluate *package* variable I get COMMON-LISP-USER (lispworks). > Do I maybe have to prefix random with COMMON-LISP-USER like > COMMON-LISP-USER:random ? > Hello Haris, Notice that in an earlier thread Olof-Joachim Frahm pointed out that the dot notation "(ps (setf this.style.foo ..." is deprecated. Take a look at those messages. Regarding your question, CL-USER(4): (ps (setf foo (lisp (random #xffffff)))) "foo = 14914837;" Regards. -- Jorge Gajon
|
Pages: 1 Prev: Some code review needed Next: with-html-output-to-string indent |