Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Transfervalue
System
Hi ,
I have one form which is having two buttons like populate and cancel. Once i clicked populate button on the form will appear with other buttons continue and cancel(same form)
Actually i want to pass one values from first screen to second screen.I mean when first time i clicked i want to pass one values from there to next step.Is there any way .
Thanks in advance
Find more posts tagged with
Comments
akshathp
Assuming 2 things:
I am assuming you are talking about CGI forms. And am also assuming you are aware of web applications development.
Solution:
Yes there are ways to get this working pretty quick. You could make use of query strings. ANd alos you can use the form action method. Where method could be post or get. Pass the input values and hidden fields.
Hope this helps!
Akshat Pramod Sharma
Interwoven Inc.
Migrateduser
Thanks for your reply. I am using cgi forms u r right.
I am trying like this
print "<input type=hidden name=\"$key\" value=" .
@popvalues
. " ";
Could pls.give example. How to pass and get the value bcz i am not so good in CGI
Thanx once again
akshathp
well, this is not exactly how it should be. I see you have a hidden value and I also see that you are trying to pass an array reference to it. So, how will so work on the values at the receiving end.
Ofcourse you would be the best person to judge what are the reuirements for your project.
Just an example:
<form name="somename" action="targetapplication" method="post"> (this method could be "get" based on how you want the values to be passed to your application.
<input type=hidden name=name1 value=val1>
...
...
<input type=submit name=submitname>
</form>
If you are generating a list of values dynamically then embedd your logic of looping statement within this form. And at the receiving end, you can parse the CGi and fetch parameters.
Also, I would suggest to get hold of PERL reference book. That should give indepth details of form designing.
Hope this helps!
Akshat Pramod Sharma
Interwoven Inc.
Migrateduser
Thank u very much for ur suggestion
Migrateduser
Hi,
I am able to pass and get the value. Is it possible to pass array? and one more thing
I have string " aaaaa bbbb" like this. When i am passing this value it is taking only first part aaaa.Is there anything i need to pass string with spaces.
Thanx in advace
akshathp
1. Yes you can pass an array but I would suggest to pass it one by one as hidden elements so that retrieval is easier.
2. Your string should not break unless you are missing on quotes or some special character escapes.
Can you post your code as an attachment with this post?
Akshat Pramod Sharma
Interwoven Inc.
Migrateduser
Hi,
Thanx for ur reply. Pls. check attachment
akshathp
Your code:
print "<input type=hidden name=\"regens\" value="
.
@regen_files
.
">";
Your array "
@regen_files"
is not in quotes. So after converting the values, since it is not in quotes, it spits back only first word. Get it wrapped around quotes.
Something like this:
print "<input type=hidden name=\"regens\" value=
\"
@regen_files\"
>";
I didn't get a chance to test this code but am sure it would work.
Akshat Pramod Sharma
Interwoven Inc.
Migrateduser
Thanx
I got it with ur help
Thank u once again
Adam Stoller
If only because I like posting perl-ism's ... :-)
<font color='brown'> print "< input type=hidden name=\"regens\" value=\"
@regen_files\">
;";</font>
Could be more easily represented (without all the '\'s) as:
print qq(< input type="hidden" name="regens" value="
@regen_files">
;
BTW: not having
@regen_files
in quotes should result in getting all the elements of the array - but without any delimeters (like "OneTwoThree" instead of "One Two Three")
--fish
(Interwoven Senior Technical Consultant)