Neon Web » Free Code » Directions from anywhere

Directions from anywhere

Description: This code lets you access Yahoo! maps direction to you location directly from your website.

Demo:

Get directions from your house to PNC Park!
Enter your address below!
Street Address:
City and state, or just zip:
Instructions:
  1. Insert the following script into your document:
      	<FORM METHOD="get" TARGET="_blank" STYLE="border:double 3px blue; padding:8px; width:400px"
    	ACTION="http://maps.yahoo.com/py/ddResults.py?Pyt=Tmap&tarname=&tardesc=&osd=&newname=&newdesc=&dsd=&newHash=&newTHash=&newErr=&newTErr=&newFL=Use+Address+Below" >
    	<!-- enter your address information in these hidden form elements -->
    	<INPUT TYPE="hidden" NAME="newtaddr" VALUE="115 Federal Street">	<!-- your street address -->
    	<INPUT TYPE="hidden" NAME="newtcsz" VALUE="Pittsburgh PA 15212">	<!-- your city state zip -->
    	<!-- leave this alone -->
    	<INPUT TYPE="hidden" NAME="newtcountry" VALUE="us">
    	<INPUT TYPE="hidden" NAME="newcountry" VALUE="us">
    	<INPUT TYPE="hidden" NAME="newTFL" VALUE="Use+Address+Below">
    	<!-- visible form elements -->
    	Enter your address below!<BR>
    	Street Address:
    	<INPUT TYPE="text" NAME="newaddr" SIZE="25">
    	<BR>
    	City and state, or just zip:
    	<INPUT TYPE="text" NAME="newcsz" SIZE="25">
    	<BR>
    	<INPUT TYPE="submit" VALUE="Get Directions">
    	</FORM>
      
  2. Modify the VALUE attributes in lines 4 and 5 to your address.
That's all!