tags:

views:

95

answers:

2

I'm making a Greasemonkey script for the Runecape forums (Yes runescape! :p) and I'm trying to make something to look up stats.

$('.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);
    });

But it just doesn't work. I looked at the response in Firebug but the response is blank and it gave me a 501 Not implemented error. Also in firebug where it says either POST or GET it says OPTIONS.

Why is it doing this?

I thought mabey its the fact that ajax doesn't work across different domains but this is just a different sub-domain and I think Greasemonkey overrides that anyway.

A: 

Try delete:

http://hiscore.runescape.com/

from address in load function.

Rin
Wouldn't work as the script is being run on http://forum.runescape.com/...
Ben Shelock
A: 

Seems I can't do it with jQuery, I have to use a greasemonkey function.

http://diveintogreasemonkey.org/api/gm%5Fxmlhttprequest.html

Ben Shelock