Monday, September 19, 2016

Cross Bowser requrest using JSON in Jquery



$(document).ready(function() {
 var cdbUrl = "http://test-travel-point.com"
 $.getJSON(cdbUrl+"/checkAvailable/searchAvailable",{ 'trvelby': 'bus','seat':'1' }).done(function( res ) {
         retVal=parseInt(res);
         if( retVal>0) {
   $('.errorClass').prepend('Hi! We not having service this place.');
  } else {
   $(userSearchForm).submit();
  }
 });
});