[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] ajax egg
From: |
Daishi Kato |
Subject: |
Re: [Chicken-users] ajax egg |
Date: |
Tue, 20 Sep 2005 19:20:14 +0900 |
User-agent: |
Wanderlust/2.15.1 (Almost Unreal) Emacs/21.4 Mule/5.0 (SAKAKI) |
At Tue, 20 Sep 2005 02:48:43 -0700,
felix winkelmann wrote:
>
> On 9/20/05, Daishi Kato <address@hidden> wrote:
> > Hi,
> >
> > This is very nice. I was going to build a sample application,
> > and found a limitation that the callback procedure is zero-argument
> > and cannot receive inputs such as events and form values.
> > As looking into prototype.js, there seems no (easy) way to
> > get events or values as parameters of REQUEST.
> > Am I missing something? Or this is just as is.
> >
>
> You can use `(current-request)' and `(argument ...)' to
> access any URL-encoded arguments. Moreover,
> `(http:request-body ...)' will give you access to the
> request-body, in case of a POST request. Se the spiffy and
> http documentation.
Thanks for the pointers.
Hmm, (current-request) just gives me #f.
I will take a more look into it.
Do you know any way to pass events as parameters?
I would like to get key code that a user pressed in a browser.
BTW, here is a little fix:
--- ajax.scm.orig 2005-08-25 04:37:36.000000000 +0900
+++ ajax.scm 2005-09-20 19:07:25.000000000 +0900
@@ -103,7 +103,7 @@
(define (remote-button text thunk . more)
(let ((out (apply remote-action thunk more)))
(case (ajax-output-format)
- ((html) (sprintf "<button onclick=\"~a\">~a</a>" out text))
+ ((html) (sprintf "<button onclick=\"~a\">~a</button>" out text))
(else `(button (@ (onclick ,out)) ,text)) ) ) )
(define (remote-timer freq thunk . more)
Daishi