|
Mailing Lists
|
Home /
Groups /
ColdFusion Talk (CF-Talk)
Pass a form variable through a hyperlink
All,coldfusion.developer 02/23/07 11:13 A you can pass form variables directly in the URL by using the GETCharlie Griefer 02/23/07 11:20 A By default, any variable you pass using a URL goes into the URL scope.Andy Matthews 02/23/07 11:22 A coldfusion.developer@att.net wrote:Jim Wright 02/23/07 11:29 A 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 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 ----- 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 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>
|
May 25, 2013
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||