On 05/10/2011 1:48 PM, Krinkle wrote:
Tod wrote:
Now that I've got this working I tried to
replace it with a jQuery
AJAX
call (test.php returns some canned JSON data):
$j(document).ready(function() {
alert("Ready...");
var
strURL="http://test.server.com/test.php".php";
alert("Making ajax call...");
$j.ajax({
type: 'GET',
url: strURL,
async: false,
cache: false,
dataType: 'json',
error: function(jqXHR, textStatus, errorThrown) {
alert(textStatus);
}
success: function(data,status,request){
$j( '#p1' ).html(data);
}
})
})
Nothing is returned, not even an error. Is this supported on MW
1.6.15?
Thanks - Tod
Likely not related to MediaWiki in any way.
Sorry, I wouldn't intentionally post anything to the list that wasn't.
This is a continuation of the jQuery solution Max posted a couple of
messages up in this thread. I'm trying to replace his suggestion, that
I got to work, with a more involved attempt at making a service call and
presenting those results.
Cross-domain requests are not allowed by browser due
to security issues.
Understood.
If strURL is in fact within the domain you execute
from, then
something is wrong.
It is (domain changed to protect the innocent) and there is something
wrong. I just wanted to make sure what I'm trying to do is supported by
MW 1.16.4 (I think I mentioned 1.16.5 earlier) before I started digging
in and debugging.
There is a way to get data from other domains, but it
requires the
other domain
offering a method to do so. One popular way is a callback parameter
which is
called with a JSON object.
I agree with you completely, but my clients sometimes don't =:| Thanks
for your help and patience.
Regards - Tod