Problem Description
I receive an non-descriptive "error" message whenever attempting to call an HTML page. However, there are response headers returned, but no actual response. I've gone as far as stepping through the JQuery and now at a loss of what else I can do?
Ultimately, I am attempting to get the following URL http://www.impre.com/uForms/external/getWeatherByZip?modules=top to display in a div I've created in the HTML of the main page.
Code
<script type="text/javascript">
$.ajax ({
type: "GET",
url: "http://www.impre.com/uForms/external/getWeatherByZip",
data: "modules=top",
success: function(data)
{
alert('Load was performed.');
$('#accuWeatherContainerTop').html(data);
},
error: function(data, responseText)
{
try
{
console.log('errData: ', data);
console.log('responseText: ', responseText);
} catch(e) {
alert("You don't have Firebug!\nFor shame...");
}
},
complete: function(jqXHR, textStatus) {
console.log('com_jqXHR', jqXHR.getAllResponseHeaders());
}
});
</script>
Notes
Upon several iterations, I worked out several kinks such as a 301 error message which I was getting. I finally got the GET response code of "200 OK" but still no response text.
The url I am attempting to connect to is using the Zend Framework which I'm unsure how it would ultimately affect the AJAX request.
RESOLUTION
It was indeed a Same-Origin policy violation and all of the responses were accurate in this suspicion. The original problem was the 301 error which I had resolved; on a whim I went ahead and pushed it onto the live website and the production server now properly displays the widget. Thanks!