[Zope] Names containing colons?
Christopher J. Kucera
ckucera@globalcrossing.com
Wed, 22 Mar 2000 08:28:33 -0600
Skip Montanaro wrote:
> In my web page input forms I've been using field names like
> "radius:int" so Zope will coerce variables to the proper type.
> This works fine on the server. Unfortunately, if I have a
> JavaScript function on my web page to do form input validation,
> how do I reference that object? Is there some alternate naming
> scheme that will allow Zope to do the type cast and allow
> references from JavaScript? Should I just forego the :int stuff
> altogether and do the coercion explicitly?
In your JavaScript functions, reference the variable as such:
forms[0].elements["radius:int"]
(Replace the "0" with an actual name if you've named your form . . .)
-CJ