Subject: RE: What's this thing do?well i did some digging since you both were so helpfull. it calls this function: function routesubmitform() { sndReq("action=newroutebike", routecallback) sndReq("action=newrouterun", routecallback) sndReq("action=newrouteswim", routecallback) } whith routecallback being: function routecallback(http) { if(http.readyState == 4){ var response = http.responseText; var update = new Array(); if(response.indexOf('|') != -1) { update = response.split('|'); document.getElementById(update[0]).innerHTML = update[1]; if (update[0] == "bikecontainer") updatebikeroute(); if (update[0] == "swimcontainer") updateswimroute(); if (update[0] == "runcontainer") updaterunroute(); } } and the update***route function being: function updatebikeroute() { var importdistance, destinationformat, distance; destinationformat = getmeasurement(document.getElementById("bikedunit").options[document.getElementById("bikedunit").selectedIndex].value); importdistance = parseFloat(document.getElementById("bikedroute").options[document.getElementById("bikedroute").selectedIndex].getAttribute("totaldistance")); distance = document.getElementById("bikeddist") if (!isNaN(importdistance) & importdistance!=0) { distance.value = convertdistance(importdistance, destinationformat, "km") } } I have limited java script experience, but it's obviously something to do with the routes. my guess is a debug thing you either forgot to take out or that you left in for testing. Appears to go into your routes and pull the distance from whatever has recorded data or whatever was recently updated Edited by vortmax 2007-03-07 10:22 AM
|