I'm kind of confused to as to the end game of what D's trying to  
accomplish exactly, but I think Ben's code is on the right track.   
Probably better to use a <cfhttp> tag during the Post process to get  
the job done, though and then use the response to determine the page  
action.

<cfif isDefined('form.imgclick')>
<cfset formscopeurl = "?action=senddata"/>
<!--- Create a list of formfields we don't want to pass --->
<cfset formextras = "formfields,other,fields,we,don't, need"/>
<!--- Loop the formscope and create the URL --->
<cfloop collection="form" item="field">
<!--- Check against our list before adding to the url --->
<cfif not listFind(formextras,field)>
<cfset formscopeurl = formscopeurl & "&amp;#field#=#urlEncodedFormat 
(evaluate("form." & field))#"/>
</cfif>
</cfloop>
<!--- Send it and create a variable for the response --->
<cfhttp url="http://myurl.com#formscopeurl#"; method="post"  
result="myactiondata"/>
</cfif>

If there aren't many variables to pass, though you can always use  
javascript to create your url parameters on the fly.  Might be easier  
and less involved as well.

Jon

On Oct 30, 2006, at 6:24 PM, Brad Wood wrote:

> Hmmm, now I'm even more confused about what you are trying to
> accomplish.  Just ignore my previous post I guess-- your code below
> doesn't even use image maps.
>
> One word of warning though-- the code below will break if your form
> variables are not simple variables.  (CF will occasionally create
> complex variables in the form scope-- for instance when you submit  
> from
> a flash form cfgrid.)  Also, if you upload a file in a form, you can't
> represent that in the URL to my knowledge.
>
> ~Brad
>
> -----Original Message-----
> From: Ben Koshy [mailto:[EMAIL PROTECTED]
> Sent: Monday, October 30, 2006 5:14 PM
> To: CF-Talk
> Subject: Re: I know it sounds crazy ...
>
> <cfset formscopeurl = "">
>     <cfloop collection="FORM" item="Field">
>         <cfset formscopeurl = formscopeurl &
> "&amp;#urlencodedformat(form[field])#">
>     </cfloop>
>
> <cfoutput><a
> href="mysite.com/index.asp?action=process#formscopeurl#"></cfoutput>
>
> Would something like that work?
>
> ----- Original Message -----
> From: <[EMAIL PROTECTED]>
> To: "CF-Talk" <cf-talk@houseoffusion.com>
> Sent: Tuesday, October 31, 2006 4:20 AM
> Subject: I know it sounds crazy ...
>
>
>> All,
>>
>> Is it possible to pass the FORM. scope somehow through a hyperlink?
>>
>> I have severeal images that I've imagemapped and need to place
> hyperlinks
>> in them.
>> I was thinking of creating a submit button with the image that  
>> needs a
>
>> hyperlink.
>>
>> I'm trying to work an application hosted by an "Application Service
>> Provider"
>> contracted on before I started.  This ASP uses a home grown CF
> methodology
>> and I'm havinig a hard time trying to figure it out.
>>
>> I'm unable to create a hyperlink that would pass values in the URL to
>> extract data
>> to the template.  The application only takes the FORM.variable name.
> They
>> want
>> 2 hours at $150/hr to make their application to work with the URL
> scope.
>>
>> Thank for any feedback.
>>
>> D
>>
>>
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:258497
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to