Hi
I have got this working great, but I am completely at a loss as to why
my variable with the data for distance "$total_shipping_handling_new
"works with an echo statement and prints ok but returns no value when
it is used on line 204, I think it must be a scope thing but just cant
seem to work it out, basically it is a hack to an existing shipping
rate option within a joomla/vurtumart site

I have made my comments in caps
http://92.48.69.178/standard_shipping.txt
Many thanks for sharing your knowledge












On Sep 15, 2:54 pm, JohnPru <[EMAIL PROTECTED]> wrote:
> I still seem to be having problems, all I need to get back via
> the .PHP page is the miles as I just want to see if it is working, I
> am not that good at javascript as you can probably tell, It is the
> callback function and
> document.getElementById("costGoesHere").innerHTML=data; where I don't
> really understand what is going on,
> thanks again
>
> var dirn = new GDirections();
>
>   GEvent.addListener(dirn,"error", function() {
>     GLog.write("Failed: "+dirn.getStatus().code);
>   });
>
>   GEvent.addListener(dirn,"load", function() {
>
> var dist = ("The distance is "+dirn.getDistance().meters);
> GDownloadUrl("callback_miles.php?distance="+dist,callbackFunction);
>
> function callbackFunction(data) {
>     document.getElementById("costGoesHere").innerHTML=data;
>   }
>   });
>
>   var start = "FY2";
>   var end = "FY1";
>
>   dirn.loadFromWaypoints([start,end],{getSteps:true});
>
> On Sep 10, 12:55 pm, "warden [Andrew Leach - Maps API Guru]"
>
> <[EMAIL PROTECTED]> wrote:
> > On Sep 10, 12:50 pm, Andrew Leach wrote:
>
> > >   echo $val * 1609 * 14.5 // calculate cost at GBP14.5 per mile
>
> > B****r. That will create a vastly inflated cost!
> >$val / 1609 * 14.5 would be a bit more reasonable.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to