You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Sr...@bankone.com on 2004/04/07 16:35:32 UTC
Passing arguments
Hi,
I have a component, and inside component I am calling another component like this
Component1:
------------------
<a href="/component2?arg1=[+ $fdat{arg1} +];arg2=[+ $fdat{arg2} +];arg3=[+ $fdat{arg3} +].....>SomeData</a>
The problem is I have many arguments to pass and I have a long navigation path. Is there any way in embperl to send
these arguments (or form data) of component1 to component2 or reference them in component2 without
specifying them in the href tag. I appreciate your help.
Thanks,
Sreeram
**********************************************************************
This transmission may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is STRICTLY PROHIBITED. If you received this transmission in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you
**********************************************************************
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: Passing arguments
Posted by Christian Frantsen <ic...@guruland.org>.
Sreeram_Bazaru@bankone.com wrote:
> Hi,
> I have a component, and inside component I am calling another component like this
> Component1:
> ------------------
> <a href="/component2?arg1=[+ $fdat{arg1} +];arg2=[+ $fdat{arg2} +];arg3=[+ $fdat{arg3} +].....>SomeData</a>
> The problem is I have many arguments to pass and I have a long navigation path. Is there any way in embperl to send
> these arguments (or form data) of component1 to component2 or reference them in component2 without
> specifying them in the href tag. I appreciate your help.
>
> Thanks,
> Sreeram
As long as the total lenght doesn't exceed the maximum allowed URL
length you could try this:
<a href="/component2?[+ \%fdat +]>SomeData</a>
If you don't want it in the href at all I guess you have to put it in
$udat or similar.
--
Christian
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re[2]: Passing arguments
Posted by "Luiz Fernando B. Ribeiro" <lu...@engenhosolucoes.com.br>.
Luiz,
Wednesday, April 7, 2004, 1:17:24 PM, você escreveu:
LFBR> Sreeram,
LFBR> Wednesday, April 7, 2004, 11:35:32 AM, você escreveu:
Sbc>> Hi,
Sbc>> I have a component, and inside component I am calling another component like this
Sbc>> Component1:
Sbc>> ------------------
Sbc>> <a href="/component2?arg1=[+ $fdat{arg1} +];arg2=[+
Sbc>> $fdat{arg2} +];arg3=[+ $fdat{arg3} +].....>SomeData</a>
Sbc>> The problem is I have many arguments to pass and I have a
Sbc>> long navigation path. Is there any way in embperl to send
Sbc>> these arguments (or form data) of component1 to component2
Sbc>> or reference them in component2 without
Sbc>> specifying them in the href tag. I appreciate your help.
LFBR> You should use a form with POST method.
LFBR> 1. Put a <form method="POST" action="/component2"
LFBR> name="myForm"> somewhere in your
LFBR> page.
LFBR> 2. Put your arguments in hidden tags or use the magical [$ hidden $]
LFBR> feature of Embperl to populate your form.
LFBR> 3. In your link put href="document.myForm.submit()".
There was an error in my own POST:
on step 3, it should be:
3. In your link put href="javascript:document.myForm.submit()".
This is a safe way to use long arguments, since IE only supports about
2048 bytes in the URL. But anyway if you have many Kb to send in a
URL you can always redesign your application to keep data on the
server side using %udat, as suggested.
Sorry for the mistake,
--
Luiz Fernando B. Ribeiro
Engenho Soluções para a Internet
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: Passing arguments
Posted by Angus Lees <gu...@inodes.org>.
At Wed, 7 Apr 2004 13:17:24 -0300, Luiz Fernando wrote:
> Wednesday, April 7, 2004, 11:35:32 AM, você escreveu:
> Sbc> I have a component, and inside component I am calling another component like this
> Sbc> Component1:
> Sbc> ------------------
> Sbc> <a href="/component2?arg1=[+ $fdat{arg1} +];arg2=[+
> Sbc> $fdat{arg2} +];arg3=[+ $fdat{arg3} +].....>SomeData</a>
> Sbc> The problem is I have many arguments to pass and I have a
> Sbc> long navigation path. Is there any way in embperl to send
> Sbc> these arguments (or form data) of component1 to component2
> Sbc> or reference them in component2 without
> Sbc> specifying them in the href tag. I appreciate your help.
>
> You should use a form with POST method.
> 1. Put a <form method="POST" action="/component2" name="myForm"> somewhere in your
> page.
> 2. Put your arguments in hidden tags or use the magical [$ hidden $]
> feature of Embperl to populate your form.
> 3. In your link put href="document.myForm.submit()".
or if you're using sessions you can just cram it all into %udat (or
%sdat in newer Embperl versions) and it'll magically appear wherever
that user goes..
--
- Gus
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: Passing arguments
Posted by "Luiz Fernando B. Ribeiro" <lu...@engenhosolucoes.com.br>.
Sreeram,
Wednesday, April 7, 2004, 11:35:32 AM, você escreveu:
Sbc> Hi,
Sbc> I have a component, and inside component I am calling another component like this
Sbc> Component1:
Sbc> ------------------
Sbc> <a href="/component2?arg1=[+ $fdat{arg1} +];arg2=[+
Sbc> $fdat{arg2} +];arg3=[+ $fdat{arg3} +].....>SomeData</a>
Sbc> The problem is I have many arguments to pass and I have a
Sbc> long navigation path. Is there any way in embperl to send
Sbc> these arguments (or form data) of component1 to component2
Sbc> or reference them in component2 without
Sbc> specifying them in the href tag. I appreciate your help.
You should use a form with POST method.
1. Put a <form method="POST" action="/component2" name="myForm"> somewhere in your
page.
2. Put your arguments in hidden tags or use the magical [$ hidden $]
feature of Embperl to populate your form.
3. In your link put href="document.myForm.submit()".
--
Luiz Fernando B. Ribeiro
Engenho Soluções para a Internet
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org