CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.

YesSoftware Forums -> CodeCharge Studio -> ASP

 How do I pass a form variable to a link?

Print topic Send  topic

Author Message

Posts: 14
Posted: 07/02/2010, 9:43 AM


Can anyone help me with this one?

I have a form with a textbox on it called 'textbox1'.

I need to get my users to type a phrase into the box, and then click a link to take them to a search form.

I want to pass the value of the text they type as a parameter to the search form.

Add a new parameter and selecting type 'form' seems to be logical, in the field 'sourcename' no matter how I format textbox1 the link wont pick it up.

How do I reference the link dialog to pick up the vlaue in the the textbox??

Any ideas gratefullyl received. It is probably really simple and I am just an idiot.

David Powell
View profile  Send private message

Posts: 53
Posted: 07/05/2010, 11:06 PM

Hi David,

I have an idea for you.

Page 1 - The first page with the desired link behavior
Page 2 - The search form page

On Page 1:

Create a search form, name the field whatever you want your parameter named. Set the Return Page property of the form to the search form page. Set the inline CSS style of the search button of the form to look like a link.

The following style should do the trick:

background-color: transparent; border: 0px; color: blue; text-decoration: underline; cursor: hand;  

On Page 2:

Use request.form("fieldname") access the submitted value where fieldname is the name you used on Page 1.

View profile  Send private message

Posts: 948
Posted: 07/08/2010, 5:27 AM


before or after insert event save contents of field to a session.

Set value of the control on the second page to the session, do it all the time ;-)

PS: you're not an idiot :-P Sometimes you have to think different to get the best out of CCS.

View profile  Send private message

Posts: 14
Posted: 07/08/2010, 6:13 AM

In the end I used the client side onchange event and extracted the value of the textbox to a var using

var xx

xx=document.getelementbyID("... full id of control here").value

then set

document.getelementbyID(".. full id of link here").href=xx

and it all worked amazingly enough! That tip via yessoftware support people.....

Thanks for your help and responses..
David Powell
View profile  Send private message

Add new topic Subscribe to topic   

These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.

Home   |    Search   |    Members   |    Register   |    Login

Powered by UltraApps Forum created with CodeCharge Studio
Copyright 2003-2004 by  and YesSoftware, Inc.