Re: Where to place the common ajax functions for shipping module plugin
Please note the following sample ajax call code. I have to use autocomplete jquery library thatswhy I am doing it normal jQuery way instead of some conventional X-Cart way:
jQuery("document").ready(function(){
jQuery("#shippingaddress-city").autocomplete('test', {
extraParams: {
countrycode: function() { return jQuery("#shippingaddress-country-code").val();},
city: function() { return jQuery("#shippingaddress-city").val(); }
},
minChars: 0,
max: 200,
multiple:false,
scrollHeight: 220,
autoFill: false,
mustMatch: false,
selectFirst:true,
cacheLength:1
});
jQuery("#shippingaddress-zipcode").autocomplete('test', {
extraParams: {
countrycode: function() { return jQuery("#shippingaddress-country-code").val();},
zip: function() { return jQuery("#shippingaddress-zipcode").val(); }
},
minChars: 0,
max: 200,
multiple:false,
scrollHeight: 220,
autoFill: false,
mustMatch: false,
selectFirst:false,
cacheLength:1
});
});
__________________
Regards,
Aneel Sarwar
X-Cart version: 5.2.10
Windows: 7
Modules: Free version modules
|