【问题标题】:Windows Desktop Gadget using jQuery to call JSON from web siteWindows 桌面小工具使用 jQuery 从网站调用 JSON
【发布时间】:2012-07-24 14:59:02
【问题描述】:

在有人这么说之前,是的,我确实通读了 SO 中引用的各种示例,但它们都没有做我想做的事情。 :)

我可以让我的小工具出现在小工具列表中,并且我可以将它添加到桌面。我正在寻找一个由 ajax 调用更新的简单下拉列表。 The drop down list contains "To Do" categories and when a category is selected/changed, the "To Do" items will be displayed in the gadget (in the file, I wanted the results to appear in the <div id='results'></div> so that the如果用户需要更改待办事项类别,下拉列表仍然可见。

我可以让下拉容器出现,但是当它尝试进行 ajax 调用时,没有返回数据。

我知道我需要输入$.support.cors = true;,但我不知道应该去哪里。我发现大量的帖子表明它需要从 jQuery 1.5 开始添加,但没有一个指定它需要去哪里。

我拆开了 StackOverflow Flaid 小部件,这是最大的帮助,但即使在那里,我也找不到任何对 $.support.cors = true; 的引用

我很沮丧。

【问题讨论】:

    标签: jquery windows windows-desktop-gadgets


    【解决方案1】:

    Ben Nadel 博客文章消除了我与 CORS 的“差距”。事实证明,我的问题不在于小工具(不是我真正认为的),而是我需要添加到小工具中的更多 javascript。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-10-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-01-05
      • 1970-01-01
      相关资源
      最近更新 更多