4

I'm trying to get data from a web-page into my sidebar gadget via:

$.get("http://localhost/index.php", function(data) {
    $("#result").html("Data Loaded: " + data);
});

When I view this via my Apache webserver, it works.
Using this code within the Gadget, it doesn't.

Is there a way to simply get data from a web-page into a Windows Gadget?

greets - lugro (sorry for my bad English)

System: Windows 7 jQuery v1.5.2

lugro
  • 43
  • 3
  • duplicate http://stackoverflow.com/questions/385220/windows-gadgets-jquery ? – g19fanatic Apr 21 '11 at 14:56
  • 1
    @g19fanatic these are not duplicates, as this question is for a specific jquery function **get**, and the other is asking if you can use jquery at all. As a matter of fact you can use **jquery** and you can also use jquery **get** function. – Gabriel Guimarães May 09 '11 at 12:42

2 Answers2

3

Yes! you have to set this property:

jQuery.support.cors = true;
Gabriel Guimarães
  • 2,724
  • 3
  • 27
  • 41
0

It has something to do with Win Vista/7 security... in Vista, IE7 you cannot open file from PC and from Web together. Try to lower your security. Jara001

Edit: I am also trying to come up with solution. If I find it, I'll post it.

  • nope, its not about windows is about JQuery knowing what feature is supported by what browser, and the windows gadget not being supported by JQuery. So if you ignore it and set the flag to yes this is supported, then it will work. – Gabriel Guimarães May 09 '11 at 12:38