public/js/form.js
//finds pet info from the data entered by users
finds pet info from the data entered by users
finds pet info from the data entered by users
function myDisplayFunction() {
  $("#reviews").html("");
  console.log("hihi");
  try {
    $.ajax({
      type: 'GET',
      dataType: 'jsonp',
      url:"https://api.petfinder.com/pet.find",
      crossDomain: true,
      data: $("#f1").serialize()+"&key=08fc6364a46811e277f4e63ebde75eca&animal=dog&format=json",
      jsonpCallback: "displayInfo",
      success: function() {},
      error: function() { alert('Failed!'); },
    });
    return false;
  } 
  catch (e) {console.log(e.description);}
}
function myDisplayFunction ( ) { $ ( "#reviews" ) . html ( "" ) ; console . log ( "hihi" ) ; try { $ . ajax ( { type : 'GET' , dataType : 'jsonp' , url : "https://api.petfinder.com/pet.find" , crossDomain : true , data : $ ( "#f1" ) . serialize ( ) + "&key=08fc6364a46811e277f4e63ebde75eca&animal=dog&format=json" , jsonpCallback : "displayInfo" , success : function ( ) { } , error : function ( ) { alert ( 'Failed!' ) ; } , } ) ; return false ; } catch ( e ) { console . log ( e . description ) ; } }
finds pet info from the data entered by users
finds pet info from the data entered by users
//this is the petfinder api //documentation is at https://www.petfinder.com/developers/api-docs