You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by angeloimm <an...@libero.it> on 2004/12/16 16:38:36 UTC

Passing some parameters to a Form by using shoForm

Hi all.
I want to pass some parameters to a form by using the showForm method.
I.E; let's imagine we are in a flow script. Now by using sendPage we can do:

cocoon.sendPage( "MyPage.jx", {"key":value, "key1":value1} )

Now how can i do a similar thing by using showForm? I have tried to do:

var form = new Form("myForm.xml");
form.showForm( "myTemplate.jx", {"key":value, "key1":value1} );

but i have an error that says to me that showForm wants a function instead of these parameters.... so i have tried:

var form = new Form("myForm.xml");
form.showForm( "myTemplate.jx", function(){var key = "key"; var value = value; } );

but how can i recover these parameters in the page?
Thanks to all



____________________________________________________________
Regala e regalati Libero ADSL: 3 mesi gratis, navighi veloce e scarichi a 1.2 Mega. 
Abbonati subito senza costi di attivazione su http://www.libero.it




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Passing some parameters to a Form by using shoForm

Posted by go...@osmosis.gr.
On Thu, 16 Dec 2004, angeloimm wrote:


hi 

i guess that you want to set a value in a widget before display the form
you can check this thread
http://marc.theaimsgroup.com/?t=110320352200003&r=1&w=2

or set value this weay :
var form = new form("yourForm.xml");
form.lookupWidget("widgetNameYouAreLookingFor").value = "value";

-- stavros


> Hi all.
> I want to pass some parameters to a form by using the showForm method.
> I.E; let's imagine we are in a flow script. Now by using sendPage we can do:
> 
> cocoon.sendPage( "MyPage.jx", {"key":value, "key1":value1} )
> 
> Now how can i do a similar thing by using showForm? I have tried to do:
> 
> var form = new Form("myForm.xml");
> form.showForm( "myTemplate.jx", {"key":value, "key1":value1} );
> 
> but i have an error that says to me that showForm wants a function instead of these parameters.... so i have tried:
> 
> var form = new Form("myForm.xml");
> form.showForm( "myTemplate.jx", function(){var key = "key"; var value = value; } );
> 
> but how can i recover these parameters in the page?
> Thanks to all



____________________________________________________________
Regala e regalati Libero ADSL: 3 mesi gratis, navighi veloce e scarichi a 1.2 Mega. 
Abbonati subito senza costi di attivazione su http://www.libero.it


> 
> 
> ---------------------------------------------------------------------
> 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