House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  ColdFusion Talk (CF-Talk)

Pass a form variable through a hyperlink

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
All,
coldfusion.developer
02/23/07 11:13 A
coldfusion.developer@att.net wrote:
Jim Wright
02/23/07 11:29 A
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
coldfusion.developer
02/23/2007 11:13 AM

All, Is there a way to pass a #form.variable#  to a form from a hyperlink? I'm trying to pass a string to a processing page from a hyperlink becuase the processing page is not under our control and we're being told there's code to handle strings passed via the URL scope. Any ideas? Thanks D

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Charlie Griefer
02/23/2007 11:20 AM

you can pass form variables directly in the URL by using the GET method of the <form> tag (this is also the default method if you don't specify one). <form method="get"> If you need a hyperlink from the form's action page, just add it to the URL. <a href="http://www.xyz.com/page.cfm?myVar=#form.fieldName#">click here or you suck</a> On 2/23/07, coldfusion.developer@att.net <coldfusion.developer@att.net> wrote: ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Andy Matthews
02/23/2007 11:22 AM

By default, any variable you pass using a URL goes into the URL scope. They'd have to have some code on the other end to evaluate your form.variable=78. All, Is there a way to pass a #form.variable#  to a form from a hyperlink? I'm trying to pass a string to a processing page from a hyperlink becuase the processing page is not under our control and we're being told there's code to handle strings passed via the URL scope. Any ideas? Thanks D

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Jim Wright
02/23/2007 11:29 AM

coldfusion.developer@att.net wrote: ----- Excess quoted text cut - see Original Post for more ----- <form action="http://theremoteurl.com/somefile.cfm" method="post" name="f" id="f"> <input type="hidden" name="formvariable" value="test"> </form> <a href="#" onClick="document.f.submit();">The Hyperlink</a>


<< Previous Thread Today's Threads Next Thread >>

Search cf-talk

December 22, 2014

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
   1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31       

Designer, Developer and mobile workflow conference