* Alan <[EMAIL PROTECTED]> [2004-07-12 16:52]:
> * Johnson [2004-06-24 07:38]:
>
> > ----- Original Message -----
> > From: "Joerg Heinicke"
> > To: <[EMAIL PROTECTED]>
> > Sent: Thursday, June 24, 2004 1:03 PM
> > Subject: Re: how to use the document object in a widget
> >
> >
> > > On 24.06.2004 02:50, Johnson wrote:
> > > > Hi!
> > > >
> > > > A newbie question,I want to handle the document object in widget like
> > > > <fd:on-value-changed>
> > > > document.getElementById("date").focus();
> > > > </fd:on-value-changed>
> > > >
> > > > But "document not define" return.
> > > > how to do this.
> > >
> > > It's form.lookupWidget("date");
> > >
> > > But there is definitely no function focus() on the server side. What you
> > > want to do is client side javascript. Therefore you have to add that
> > > snippet to your generated HTML and not to flowscript.
>
> > tks,can I do it in template or XSLT
> > But how to make it interactive with widget event
>
> Please post your replys at the bottom.
>
> You can't make it interactive. The scripting of the widgets
> takes place only on the server. That JavaScript runs and
> processes the form submission. Basically, you click a submit
> button and the browser gathers up the form contents and posts
> them to the server, where CForms processes the submission. All
> CForms has to work with is this form submission data. The actual
> form controls are in no way accessible from CForms.
>
> Cocoon does generate the form control HTML markup and sends it
> initially, but the browser methods, such a focus() exist only
> for JavaScript that runs in the browser.
>
> Does that make sense?
Apologies for including email addresses in the message body. I
know that bothers some people around here. (Need to fix my quote
template.)
--
Alan / [EMAIL PROTECTED] / http://engrm.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]