Hi.
Why doesn't this piece of code work ?
(defpackage test-x (:use :cl :hunchentoot :cl-who :parenscript)) (in-package test-x)
(setf *js-string-delimiter* #")
(defun index () (with-html-output-to-string (*standard-output* nil) (:html (:head (:script :type "texr/javascript" (str (ps (defun al () (alert)))))) (:body (:h2 "clijlkjlkjclk" :onclick (ps (al ())))))))
(push (create-prefix-dispatcher "/index" 'index) *dispatch-table*)
(start (make-instance 'easy-acceptor))
Thanks
Hi Haris,
(:script :type "texr/javascript"
This should be "text/javascript"
(:h2 "clijlkjlkjclk" :onclick (ps (al ())))))))
This should be ((:h2 :onclick (ps (al ()))) "clijlkjlkjclk")
You can see the html is not right if you call the index function from the repl.
(start (make-instance 'easy-acceptor))
You're probably not running this as root so it should be (start (make-instance 'easy-acceptor :port 8080)) because the default port is 80
Vladimir
Thanks
parenscript-devel mailing list parenscript-devel@common-lisp.net http://lists.common-lisp.net/cgi-bin/mailman/listinfo/parenscript-devel
parenscript-devel@common-lisp.net