2009-09-11 152 views
1

我为Runecape论坛制作了Greasemonkey脚本(是runescape!:p),我正在尝试查找统计信息。jQuery Ajax问题

$('.rssc_view_stats').click(function(){ 
     var this_username = $(this).attr('rel');    
     var stats_box = '<div id="stats_box"></div>'; 
     //alert('looking for the stats of' + this_username); 
     $(this).after(stats_box); 

     $('#stats_box').load('http://hiscore.runescape.com/index_lite.ws?player='+this_username); 
    }); 

但它只是不起作用。我查看了Firebug中的响应,但响应是空白的,它给了我一个501未执行的错误。也在萤火虫说POST或GET说它的选项。

为什么这样做呢?

我以为mabey它的事实,即阿贾克斯不跨越不同的领域,但这只是一个不同的子域,我认为Greasemonkey无视这一点。

+1

如果你试图打开URL传递在浏览器加载,它做你期待什么? – inkedmn 2009-09-11 21:16:25

+0

@inkedmn是的,它在浏览器中很好。 – 2009-09-11 21:20:35

回答

0

尝试删除:

http://hiscore.runescape.com/ 

从地址装载功能。

+0

由于脚本正在http://forum.runescape.com /上运行,因此不起作用... – 2009-09-11 21:23:19