Click here to Skip to main content
15,911,848 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: I am still struggling to find a fix for this. Can some guru please help? Pin
ZurdoDev4-Dec-14 10:44
professionalZurdoDev4-Dec-14 10:44 
GeneralRe: I am still struggling to find a fix for this. Can some guru please help? Pin
samflex4-Dec-14 11:05
samflex4-Dec-14 11:05 
QuestionRe: I am still struggling to find a fix for this. Can some guru please help? Pin
ZurdoDev4-Dec-14 14:14
professionalZurdoDev4-Dec-14 14:14 
AnswerRe: I am still struggling to find a fix for this. Can some guru please help? Pin
onelopez4-Dec-14 11:18
onelopez4-Dec-14 11:18 
AnswerRe: I am still struggling to find a fix for this. Can some guru please help? Pin
jkirkerx4-Dec-14 13:04
professionaljkirkerx4-Dec-14 13:04 
GeneralRe: I am still struggling to find a fix for this. Can some guru please help? Pin
samflex4-Dec-14 16:44
samflex4-Dec-14 16:44 
GeneralRe: I am still struggling to find a fix for this. Can some guru please help? Pin
jkirkerx5-Dec-14 7:58
professionaljkirkerx5-Dec-14 7:58 
GeneralRe: I am still struggling to find a fix for this. Can some guru please help? Pin
samflex5-Dec-14 8:54
samflex5-Dec-14 8:54 
Sorry jkirkerx, I didn't mean to imply that you are RyanDev.

I was trying to reply to all posts at once by mentioning your name and his.

In any case, my apologies.

Ok I will take your advice by dealing with one issue at a time.

Let's start with my js:

You referenced txt_geolocation below:
document.getElementById('txt_geolocation').value('stuff you geolocation info in here');
Did you mean results?

Please see entire js and you will see that my js has it this way:
document.getElementById("results").innerHTML =...

PHP
<script type="text/javascript">

        var geocoder, location1, location2, gDir;

        function initialize() {
            geocoder = new GClientGeocoder();
            gDir = new GDirections();
            GEvent.addListener(gDir, "load", function () {
                var drivingDistanceMiles = gDir.getDistance().meters / 1609.344;
                var drivingDistanceKilometers = gDir.getDistance().meters / 1000;

                document.getElementById("results").innerHTML = 'From: ' + location1.address + '<br />To: ' + location2.address + '<br />Driving Distance: ' + drivingDistanceMiles.toFixed(2) + ' miles ';
            });
        }

        function showLocation() {
            geocoder.getLocations(document.forms[0].address1.value, function (response) {
                if (!response || response.Status.code != 200) {
                    alert("Sorry, we were unable to geocode the first address");
                }
                else {
                    location1 = { lat: response.Placemark[0].Point.coordinates[1], lon: response.Placemark[0].Point.coordinates[0], address: response.Placemark[0].address };
                    geocoder.getLocations(document.forms[0].address2.value, function (response) {
                        if (!response || response.Status.code != 200) {
                            alert("Sorry, we were unable to geocode the second address");
                        }
                        else {
                            location2 = { lat: response.Placemark[0].Point.coordinates[1], lon: response.Placemark[0].Point.coordinates[0], address: response.Placemark[0].address };
                            gDir.load('from: ' + location1.address + ' to: ' + location2.address);
                        }
                    });
                }
            });
        }

    </script>


And please, what do you mean by ).value('stuff you geolocation info in here');

Thanks a lot
GeneralRe: I am still struggling to find a fix for this. Can some guru please help? Pin
jkirkerx5-Dec-14 11:41
professionaljkirkerx5-Dec-14 11:41 
GeneralRe: I am still struggling to find a fix for this. Can some guru please help? Pin
samflex5-Dec-14 13:35
samflex5-Dec-14 13:35 
GeneralRe: I am still struggling to find a fix for this. Can some guru please help? Pin
jkirkerx5-Dec-14 13:47
professionaljkirkerx5-Dec-14 13:47 
GeneralRe: I am still struggling to find a fix for this. Can some guru please help? Pin
samflex5-Dec-14 14:23
samflex5-Dec-14 14:23 
GeneralRe: I am still struggling to find a fix for this. Can some guru please help? Pin
jkirkerx5-Dec-14 16:37
professionaljkirkerx5-Dec-14 16:37 
GeneralRe: I am still struggling to find a fix for this. Can some guru please help? Pin
samflex5-Dec-14 17:52
samflex5-Dec-14 17:52 
GeneralRe: I am still struggling to find a fix for this. Can some guru please help? Pin
jkirkerx5-Dec-14 18:11
professionaljkirkerx5-Dec-14 18:11 
GeneralRe: I am still struggling to find a fix for this. Can some guru please help? Pin
samflex6-Dec-14 3:47
samflex6-Dec-14 3:47 
GeneralRe: I am still struggling to find a fix for this. Can some guru please help? Pin
jkirkerx6-Dec-14 7:53
professionaljkirkerx6-Dec-14 7:53 
GeneralWorking copy of your code. Pin
jkirkerx6-Dec-14 9:00
professionaljkirkerx6-Dec-14 9:00 
GeneralRe: Working copy of your code. Pin
samflex6-Dec-14 14:47
samflex6-Dec-14 14:47 
GeneralRe: Working copy of your code. Pin
samflex6-Dec-14 16:21
samflex6-Dec-14 16:21 
QuestionAsp.net page with Web Service WITHIN code behind being called Pin
StealthRT4-Dec-14 5:13
StealthRT4-Dec-14 5:13 
QuestionRe: Asp.net page with Web Service WITHIN code behind being called Pin
jkirkerx4-Dec-14 8:55
professionaljkirkerx4-Dec-14 8:55 
SuggestionRe: Asp.net page with Web Service WITHIN code behind being called Pin
ZurdoDev4-Dec-14 10:45
professionalZurdoDev4-Dec-14 10:45 
Question.NET System.OutOfMemoryException in View using DisplayTemplate Pin
G-Alonso30-Nov-14 1:39
G-Alonso30-Nov-14 1:39 
AnswerRe: .NET System.OutOfMemoryException in View using DisplayTemplate Pin
Matt U.4-Dec-14 4:43
Matt U.4-Dec-14 4:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.