Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing form elements to Yahoo for Driving Directions

Status
Not open for further replies.

modfather

MIS
Feb 15, 2000
75
US
I'll try to be brief. I should make it clear that this isn't my code, by the way. I'm hoping someone can help me out:

I have a custom tag that *used to* work with Yahoo Maps for Driving Directions. To explain, I have a form that a user fills out with their address information and then upon submitting, a custom tag is called. The custom tag then parses the address entered and uses CFHTTP to post that data to: Some URL paramaters are passed to that URL, but I get a "Connection Failure" when trying to post. I've listed the custom tag below - I'm hoping someone will know how to help me. I looked at the source for that page, but I'm unsure if EVERY form element must be included. I can only assume that Yahoo made a slight change to the form, so it's not posting properly.

Thanks very much for any help you can give.
Steve

<!---Nice people don't delete these lines
Author : Alan L. Do (aka. da Cold Fusion Bubba)
Email : mathmjr@pacbell.net
Date : 1/17/02
Nice people credit the guy who wrote this--->

<HTML>
<HEAD><TITLE>CF_DIRECTME SOURCE CODES</TITLE></HEAD>

<BODY BGCOLOR=&quot;#FFFFFF&quot; TEXT=&quot;#000000&quot; LINK=&quot;#336699&quot; ALINK=&quot;#03510A&quot; VLINK=&quot;#555555&quot;>
<!---Hafta declare them va..ri..a..bells..--->
<CFPARAM NAME=&quot;attributes.ORIGINADDRESS&quot; DEFAULT=&quot;&quot;>
<CFPARAM NAME=&quot;attributes.ORIGINCSZ&quot; DEFAULT=&quot;&quot;>
<CFPARAM NAME=&quot;attributes.DESTINATIONADDRESS&quot; DEFAULT=&quot;&quot;>
<CFPARAM NAME=&quot;attributes.DESTINATIONCSZ&quot; DEFAULT=&quot;&quot;>

<!---That good 'ole HTTP protocol is applied here--->

<CFHTTP URL=&quot; NAME=&quot;directionyahoo&quot;
METHOD=&quot;POST&quot;
RESOLVEURL=&quot;Yes&quot;
>

<!---Here are the pre-defined parameters that Mapquest uses--->
<CFHTTPPARAM TYPE=&quot;FORMFIELD&quot; NAME=&quot;pyt&quot; VALUE=&quot;Tmap&quot;>
<CFHTTPPARAM TYPE=&quot;FORMFIELD&quot; NAME=&quot;tarname&quot; VALUE=&quot;&quot;>
<CFHTTPPARAM TYPE=&quot;FORMFIELD&quot; NAME=&quot;tardesc&quot; VALUE=&quot;&quot;>
<CFHTTPPARAM TYPE=&quot;FORMFIELD&quot; NAME=&quot;newname&quot; VALUE=&quot;&quot;>
<CFHTTPPARAM TYPE=&quot;FORMFIELD&quot; NAME=&quot;newdesc&quot; VALUE=&quot;&quot;>
<CFHTTPPARAM TYPE=&quot;FORMFIELD&quot; NAME=&quot;newHash&quot; VALUE=&quot;&quot;>
<CFHTTPPARAM TYPE=&quot;FORMFIELD&quot; NAME=&quot;newTHash&quot; VALUE=&quot;&quot;>
<CFHTTPPARAM TYPE=&quot;FORMFIELD&quot; NAME=&quot;newSts&quot; VALUE=&quot;&quot;>
<CFHTTPPARAM TYPE=&quot;FORMFIELD&quot; NAME=&quot;newTSts&quot; VALUE=&quot;&quot;>
<CFHTTPPARAM TYPE=&quot;FORMFIELD&quot; NAME=&quot;tlt&quot; VALUE=&quot;&quot;>
<CFHTTPPARAM TYPE=&quot;FORMFIELD&quot; NAME=&quot;tln&quot; VALUE=&quot;&quot;>
<CFHTTPPARAM TYPE=&quot;FORMFIELD&quot; NAME=&quot;slt&quot; VALUE=&quot;&quot;>
<CFHTTPPARAM TYPE=&quot;FORMFIELD&quot; NAME=&quot;sln&quot; VALUE=&quot;&quot;>
<CFHTTPPARAM TYPE=&quot;FORMFIELD&quot; NAME=&quot;newFL&quot; VALUE=&quot;Use Address Below&quot;>
<CFHTTPPARAM TYPE=&quot;FORMFIELD&quot; NAME=&quot;newaddr&quot; VALUE=&quot;#attributes.ORIGINADDRESS#&quot;>
<CFHTTPPARAM TYPE=&quot;FORMFIELD&quot; NAME=&quot;newcsz&quot; VALUE=&quot;#attributes.ORIGINCSZ#&quot;>
<CFHTTPPARAM TYPE=&quot;FORMFIELD&quot; NAME=&quot;newcountry&quot; VALUE=&quot;us&quot;>
<CFHTTPPARAM TYPE=&quot;FORMFIELD&quot; NAME=&quot;newTFL&quot; VALUE=&quot;Use Address Below&quot;>
<CFHTTPPARAM TYPE=&quot;FORMFIELD&quot; NAME=&quot;newtaddr&quot; VALUE=&quot;#attributes.DESTINATIONADDRESS#&quot;>
<CFHTTPPARAM TYPE=&quot;FORMFIELD&quot; NAME=&quot;newtcsz&quot; VALUE=&quot;#attributes.DESTINATIONCSZ#&quot;>
<CFHTTPPARAM TYPE=&quot;FORMFIELD&quot; NAME=&quot;newtcountry&quot; VALUE=&quot;us&quot;>


</CFHTTP>

<!---Da file output...you can play with it all you want (ie. delete it and place it elsewhere on your output page)--->
<CFOUTPUT>#CFHTTP.FileContent#</CFOUTPUT>

</BODY>
</HTML>
 
[tt]You know, macromedia has an extension for DW that does just what you're trying to accomplish.



Delete * from brain Where MaxLevel = &quot;Full&quot; and reaction = &quot;Slow&quot; order by StartOver
 
Sorry, I'm still fairly new to CF - so at the risk of sounding ignorant... huh?

We do have DW, of course, but I don't know what you mean by an &quot;extension&quot;. Kind of like an &quot;add-on&quot;, right? Any chance you might have more details? I'll search their site right now.

Thanks!
Steve
 
[tt]Access and search for the extension of interest.

Yes, extension are like add-on's which most of the time make you're coding life easier...




Delete * from brain Where MaxLevel = &quot;Full&quot; and reaction = &quot;Slow&quot; order by StartOver
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top