On 2/14/06, Stewart, Gary <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I'm using Cocoon 2.1.8 and attempting to develop a few CForms. I've been 
> working on validating the forms and for some widgets I'm attempting to use 
> Javascript but it doesn't seem to be working. I looked at the sample files 
> and could only find Javascript validation for the whole form. Is it possible 
> to do something like:
>
> <fd:field id="foo" >
>         <fd:label>Foo:</fd:label>
>         <fd:datatype base="string"/>
>         <fd:validation>
>                 <javascript>
>                    return false;
>                 <javascript>
>         </fd:validation>
>         <fd:on-value-changed>
>             <javascript>
>               this.validate();
>             </javascript>
>         </fd:on-value-changed>
> </fd:field>
>
> obviously the validation would normally be more complex but I figured this is 
> the easiest to get to work.
>
> Also does it matter if you use the namespace <fd:javascript /> or should 
> javascript always be in the xmlns="" namespace?

Use <fd:javascript>...</fd:javascript>

> Thanks (and sorry to keep throwing so many CForms questions),
>
> Gary

--
Kris Schneider <mailto:[EMAIL PROTECTED]>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to