Skip to content

Instantly share code, notes, and snippets.

@vinniewrote
Created May 29, 2012 20:24
Show Gist options
  • Save vinniewrote/2830491 to your computer and use it in GitHub Desktop.
Save vinniewrote/2830491 to your computer and use it in GitHub Desktop.
/************************/
/* Geckobyte API Object */
/************************/
//storing values of each dropdown in variables
var wfYear = $('#wfVehEnterYear').val(),
wfMake = $('#wfVehEnterMake').val(),
wfModel = $('#wfVehEnterModel').val(),
wfBody = $('#wfVehEnterTrim').val(),
wfNumDoors = $('#wfVehEnterDoors').val();
//ajax call to Fitment Group
$(".wfNext").submit(function (event){
event.preventDefault();
});
GeckoAPI = (function() {
return $.ajax({
//cache: false,
url: 'http://sears.carpronetwork.com/tools.asmx/getVehicle',
data: {
Username : 'sears',
Password : 'SEARS34w3bs3rvic3s',
YearID: wfYear,
MakeName: wfMake,
ModelName: wfModel,
BodyTypeName: wfBody,
BodyNumDoors: wfNumDoors,
Options: ""
},
dataType: 'json',
//add content to div
success: function (carLoad){
$('.wfCarImage').html(carLoad);
}
});
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment