I have a function that gets a list of vehicles in an asp.net page
function GetVehicleCounts(totalVehicles, vehiclesInDepot, vehiclesInFilter, vehiclesInKnownLocations, vehiclesInUnknownLocations, vehiclesNotInDepot)
{
vehiclesInDepot.value = 0;
vehiclesInFilter.value = 0;
vehiclesInKnownLocations.value = 0;
vehiclesInUnknownLocations.value = 0;
vehiclesNotInDepot.value = 0;
var listofVehicles;
var count = 0;
for (var k in vehicles_dm) {
vehiclesInDepot.value++;
if (vehicles_dm[k].IsInFilter) {
vehiclesInFilter.value++;
}
if (vehicles_dm[k].CurrentFeatureType == 11) {
vehiclesInUnknownLocations.value++;
}
else {
vehiclesInKnownLocations.value++;
}
}
if (vehicles_dm != null) {
vehiclesNotInDepot.value = totalVehicles - vehicles_dm.length;
}
}
However, when I add Mootools to the page I run into the problem of Mootools adding all the function calls to the results. This ends up getting repeated for any function that is similar. Any ideas for correcting?
I don't have a choice about using Mootools and the existing page is done in jQuery.