[Zope] dtml syntax question

Sam Gendler sgendler@teknolojix.com
Mon, 08 Nov 1999 17:02:00 -0800


Evan Simpson wrote:
> 
> JScript attributes are also dictionary items, so you can set/access
> attributes  whose names aren't legal identifiers using the dictionary
> syntax:
> 
> form['oname:required'].value
> 

I haven't tried it, but I don;t think this is what I want.  basically, I
want to have Javascript do some validation of the entry in the form
after they hit the 'submit' button, but before it reaches Zope. 
Therefore, I need to be able to access form.oname:required.value from
inside the html/javascript, independant of Zope.

--sam

> ----- Original Message -----
> From: Sam Gendler <sgendler@teknolojix.com>
> > If I have a form field name of "oname:required", in order to allow zope
> > to force an entry in that field, how can I access the value of that
> > field from javascript.  The normal form.fieldname.value doesn't work,
> > since it would look like 'form.oname:required.value' and javascript
> > barfs on that.  There must be a solution to this, anyone know what it
> > is?
> 
> Cheers,
> 
> Evan @ 4-am