[Bese-devel] Re: <ucw: input elements and javascript

Marco Baringer mb at bese.it
Sun Jun 4 17:18:23 UTC 2006


"Marijn Haverbeke" <marijnh at gmail.com> writes:

> Hi again,
>
> After happily playing with the <ucw:select, <ucw:text etc tags and there
> :accessors for a while, I came across situations where I needed to have
> javascript read and write to the value of such elements client-side. Since
> their values all seem to contain mysteriously hashed strings, this will not
> work. Is there a way around this? For example a way to turn off the hashing (it
> seems that is only necessary if you want to store lisp objects in them). Right
> now I'm messily working around them by using normal input fields and reading
> the post values from the request in order to store them in my component
> again... basically re-implementing the :accessor functionality.

all the tags take a :name parameter (and if they don't it's a bug)
which allows you to specify what http request parameter name to
use. all the tags also take an :id parameter, you can set that and
then use document.getElementById or whatever.

the form stuff (src/components/form.lisp) makes a lot of this easier,
you could look into those.

> Also, it seems that there is no way to get at the parameters of a request
> object without using internal ucw symbols. Is this intentional, or also a case
> of forgetting to export a symbol?

get-parameter sholud have been exported, my bad.


-- 
-Marco
Ring the bells that still can ring.
Forget your perfect offering.
There is a crack in everything.
That's how the light gets in.
	-Leonard Cohen




More information about the bese-devel mailing list