Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 8500 invoked from network); 26 Oct 2004 10:00:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 26 Oct 2004 10:00:54 -0000 Received: (qmail 31910 invoked by uid 500); 26 Oct 2004 10:00:42 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 31783 invoked by uid 500); 26 Oct 2004 10:00:41 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: users@cocoon.apache.org Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 31767 invoked by uid 99); 26 Oct 2004 10:00:40 -0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of philipp.rech@gmx.de designates 213.165.64.20 as permitted sender) Received: from [213.165.64.20] (HELO mail.gmx.net) (213.165.64.20) by apache.org (qpsmtpd/0.28) with SMTP; Tue, 26 Oct 2004 03:00:40 -0700 Received: (qmail 23066 invoked by uid 0); 26 Oct 2004 10:00:37 -0000 Received: from 53.122.197.194 by www60.gmx.net with HTTP; Tue, 26 Oct 2004 12:00:37 +0200 (MEST) Date: Tue, 26 Oct 2004 12:00:37 +0200 (MEST) From: "Philipp Rech" To: users@cocoon.apache.org MIME-Version: 1.0 References: <5E091A68F794974CAF431CA31F5AF2CC1894CF@server.bizzdesign.nl> Subject: RE: pass a variable from flowscript into cfrom text input field X-Priority: 3 (Normal) X-Authenticated: #1715056 Message-ID: <12043.1098784837@www60.gmx.net> X-Mailer: WWW-Mail 1.6 (Global Message Exchange) X-Flags: 0001 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Thank you Bart, Gunter and Nacho! still i am not shure how to use this: nameWidget = form.lookupWidget("name"); nameWidget.setValue(name); can i put this in my Flowscript? Again i want to pass a variable from a flowscript and set it as default value for the widget. I guess the code above belongs in the cfrom template but how do i pass the variable "name" to it? > and with v2 of the javascript API, you could write: > > var form = new Form("form1.xml"); > var wid = form.getWidget(); > wid.name.value = name; > uhh, how can i use version 2 of the javascript API? Thanks again, phil > I believe that getWidget() is deprecated. You should use lookupWidget() > instead. E.g. > > nameWidget = form.lookupWidget("name"); > nameWidget.setValue(name); > > and with v2 of the javascript API, you could write: > > var form = new Form("form1.xml"); > var wid = form.getWidget(); > wid.name.value = name; > > HTH, > Bart. > > -----Original Message----- > From: Gunter D'Hondt [mailto:gunter.dhondt@sofico.be] > Sent: Tuesday, October 26, 2004 11:40 AM > To: users@cocoon.apache.org > Subject: Re: pass a variable from flowscript into cfrom text input field > > Widget nameWidget = form.getWidget("name"); > nameWidget.setValu(name); > Gunter > > > "Philipp Rech" > 26-10-2004 11:29 > Please respond to > users@cocoon.apache.org > > To > users@cocoon.apache.org > cc > > Subject > pass a variable from flowscript into cfrom text input field > > > > > > > > Hello, > > how can i pass a variable from my flowscript into cfrom text input field > (as > a default value)? In the Flow it would be like > > var name = "stefano"; > > and the CForm would be > > > � � > � � �Name: > � � � > � � > > So when the user opens the page, "stefano" is written in the field. The > value has to come from the Flowscript that call the form and display > pipeline though! a simple document.form.name.value = name; wont work, eh? > > Thank you very much! Danke! > phil > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org > For additional commands, e-mail: users-help@cocoon.apache.org > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org > For additional commands, e-mail: users-help@cocoon.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org