Alpha Video Training
Results 1 to 5 of 5

Thread: Yahoo Map & Driving Directions

  1. #1
    Member
    Real Name
    Brad Chesnut
    Join Date
    Sep 2005
    Location
    Spokane, WA
    Posts
    96

    Default Yahoo Map & Driving Directions

    I created a button, used Action Scripting and chose Open A URL and added the following code to it. I put these buttons on the form so it pulled the info from the record I was on.

    In the first one (Yahoo Map), I only had to pull 2 fields into it. The address (Addr1) and the Zipcode (zip). I put

    Yahoo Map ... "http://maps.yahoo.com/maps_result?addr="+trim(Addr1)+"&csz="+trim(zip)+"&country=us&new=1&name=&qty="

    For driving directions, I had to create a database for my customers address. The code pulls from that file (only 1 record in it) and from the record I'm on to give me driving directions. The Lookup fields are for the agencies address.

    Yahoo Driving Directions ... "http://maps.yahoo.com/dd_result?newaddr="+trim(lookup("agencyinfo",".t.","Addr1"))+"&taddr="+trim(Addr1)+"&csz="+trim(lookup("agencyinfo",".t.","zip"))+"&country=us&tcsz="+trim(zip)

    I love these buttons!! Hope you enjoy them too.
    Brad
    Alpha5 User since Alpha4V3 ... Many years ago
    Primarily using A5V10.5
    Strictly an Action Script programmer (I don't grasp XBasic but wish I did!)
    I have commercial software for insurance agencies, churches & general businesses

  2. #2
    Member
    Real Name
    Harold Laski
    Join Date
    Oct 2005
    Posts
    94

    Default Maps not working

    I used your formula exactly as you had it but with my own field names. That is: "http://maps.yahoo.com/maps?syne=-3008&addr=trim(Pt_Address_1)&csz=trim(Zipcode)&country=us"

    Unfortunatley it does not work. It brings up the Yahoo Map program but puts the term trim(Pt_Address_1) into the address field and the term trim(Zipcode) into the zip code field, rather than the field values.

    What am I doing wrong?

  3. #3
    Member
    Real Name
    Brad Chesnut
    Join Date
    Sep 2005
    Location
    Spokane, WA
    Posts
    96

    Default

    This is a copy & paste of my action script. It's placed in the window, Script Genie: Open URL.

    ="http://maps.yahoo.com/maps_result?addr="+trim(Addr1)+"&csz="+trim(zip)+"&country=us&new=1&name=&qty="

    By looking at yours, you didn't put " in right place. You have one in the beginning and one at the end. Wrong. Please look at the code above and duplicate it EXACTLY (other than the field names if yours are different).

    Brad
    Brad
    Alpha5 User since Alpha4V3 ... Many years ago
    Primarily using A5V10.5
    Strictly an Action Script programmer (I don't grasp XBasic but wish I did!)
    I have commercial software for insurance agencies, churches & general businesses

  4. #4
    Member
    Real Name
    Mark Williams
    Join Date
    Dec 2005
    Posts
    318

    Default

    Thanks for the great tip!

    Now, does anyone know if this can be modified to start Miscorsoft Streets & Trips instead of Yahoo Maps?

  5. #5
    Member
    Real Name
    Harold Laski
    Join Date
    Oct 2005
    Posts
    94

    Default Directions for Map

    Thank you for the update on getting the map. I used your paste link with my field names and it worked. However I have tried your Directions code and cannot seem to get it working even with my field names. I created a table called agencyinfo and created 2 fields in it called Addr1 and zip. I then filled the table with 1 record. After copying and pasting and substituting my field names I cannot get Alpha five to accept the definition. Here is how it comes out. What is the problem here?

    "http://maps.yahoo.com/dd_result?newaddr="+trim(lookup("agencyinfo",".t.","Addr1"))+"&taddr="+trim(Address_1)+"&csz="+trim(lookup("agencyinfo",".t.","zip"))+"&country=us&tcsz="+trim(Zip)"

Similar Threads

  1. alpha and yahoo
    By martinwcole in forum Alpha Five Version 6
    Replies: 10
    Last Post: 02-22-2005, 06:38 AM
  2. decimal places driving me crazy!
    By Mario Prieto in forum Alpha Five Version 6
    Replies: 6
    Last Post: 09-24-2004, 02:42 PM
  3. Table row not completed is driving me crazy
    By Fred Daniel in forum Alpha Five Version 4
    Replies: 5
    Last Post: 12-21-2002, 05:03 AM
  4. HELP! Win2000 Permission Problem driving me nuts.
    By Nathan White in forum Alpha Five Version 4
    Replies: 5
    Last Post: 08-25-2001, 05:04 AM
  5. YAHOO!!!!!!!!!!!!!!!
    By Jamin Dunivan in forum Alpha Five Version 4
    Replies: 2
    Last Post: 05-02-2001, 05:37 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •