This is my js page
$(document).ready(function(){
$("#submitCity").click(function(){
return getWeather();
});
});
function getWeather(){
var city = $("#city").val();
if(city != ''){
$.ajax({
type: "GET",
dataType: "jsonp",
success: function(data){
var widget = showResults(data);
$("#showWeather").html(widget);
$("#city").val('');
}
});
}else{ }
}
function showResults(data){
return "<h3 style='padding-left:40px; padding-bottom:30px;'><strong>Wind Direction</strong>: "+data+"°</h3>";
}
the url works correctly on chrome
"reservation_upto": {"name": "RATLAM JN", "lng": 75.166667, "lat": 23.583333, "code": "RTM"}, "to_station": {"name": "RATLAM JN", "lng": 75.166667, "lat": 23.583333, "code": "RTM"}, "passengers": [{"current_status": "CNF/-/0/GN", "booking_status": "CNF/B2/45/GN", "no": 1}], "boarding_point": {"name": "LUCKNOW", "lng": 80.9346001, "lat": 26.8381, "code": "LKO"}, "chart_prepared": false, "debit": 3, "journey_class": {"name": null, "code": "3A"}, "train": {"name": "SABARMATI EXP", "classes": [{"name": "3rd AC ECONOMY", "available": "N", "code": "3E"}, {"name": "SECOND SEATING", "available": "N", "code": "2S"}, {"name": "SECOND AC", "available": "N", "code": "2A"}, {"name": "THIRD AC", "available": "Y", "code": "3A"}, {"name": "FIRST AC", "available": "N", "code": "1A"}, {"name": "FIRST CLASS", "available": "N", "code": "FC"}, {"name": "AC CHAIR CAR", "available": "N", "code": "CC"}, {"name": "SLEEPER CLASS", "available": "Y", "code": "SL"}], "number": "19166", "days": [{"runs": "Y", "code": "MON"}, {"runs": "N", "code": "TUE"}, {"runs": "Y", "code": "WED"}, {"runs": "N", "code": "THU"}, {"runs": "N", "code": "FRI"}, {"runs": "Y", "code": "SAT"}, {"runs": "N", "code": "SUN"}]}, "pnr": "6617656248", "from_station": {"name": "SONPUR JN", "lng": 82.5947818084139, "lat": 27.88121275, "code": "SEE"}}