-1

I used the following code, but I got the error

$(document).ready(function () {

    var jqxhr = $.get("www.goalzz.com", function () {
        alert("success");
    })
        .done(function () {
        alert("second success");
    })
        .fail(function () {
        alert("error");
    })
        .always(function () {
        alert("finished");
    });
});

Do read the html code with jQuery is possible?

Tushar Gupta - curioustushar
  • 58,085
  • 24
  • 103
  • 107
Sun Rise
  • 37
  • 1
  • 6

1 Answers1

0

Expanding on "not possible"...

The "Same origin policies" apply: your only way of communicating with the contents of iframes that come from another [domain|subdomain|protocol|port] is through the postMessage API, which of course requires the other part (the document inside the iframe) to listen to your messages.

Tushar Gupta - curioustushar
  • 58,085
  • 24
  • 103
  • 107
  • `postMessage` is for cross-frame/window communication. You can't use it with XMLHttpRequest (for which there are other options). – Quentin Sep 15 '13 at 12:12
  • Why Windows applications can read them? using (var client = new WebClient()) { string htmlCode = client.DownloadString(_src); var doc = new HtmlDocument(); doc.LoadHtml(htmlCode); return doc; } – Sun Rise Sep 15 '13 at 12:12
  • @SunRise using windows application, the client is the webbrowser component – A. Wolff Sep 15 '13 at 12:14