Hi,
You know the browser restrictions which disallow remote domain load, ie making this not work:
$("#verizon").load("http://verizon.domain.net/?var=rscms&tan=0.9");
Is there any way around that? I'd rather not have to iframe the content
Hi,
You know the browser restrictions which disallow remote domain load, ie making this not work:
$("#verizon").load("http://verizon.domain.net/?var=rscms&tan=0.9");
Is there any way around that? I'd rather not have to iframe the content
You can use a local script written in C#, PHP, or whatever you have access to that can read the contents and relay them back to the jQuery request.
$.post("remote-fetch.php", {url:"http://verizon.com"}, function(results) {
alert(results);
});
That would call a local php script that would resemble the following:
print file_get_contents($_POST["url"]);
// whatever is printed here will be alerted in our jQuery code
Of course you would want to have some more logic within your server-side script than this. My example is merely just a concept of how you could acheive the results you desire.
You can build a simple proxy in PHP or other language that takes the URL as a parameter does curl or the like to return the data to your JavaScript. Just host the proxy on the same domain.