define ajax in 1.8
#1
Hi,
if in 1.6 in myfile.js I have thst and work

new Ajax.Request('xmlhttp.php', {method: 'post', postBody: postData, onComplete: function(request)

why this do not work in 1.8?
Reply
#2
Try jQuery ?

$.ajax({
    url: 'xmlhttp.php',
    type: 'post',
    data: postData,
    success: function(response) {
        // do something with what xmlhttp.php sent
    }
});
Rasmus Lerdorf Wrote:If eval() is the answer, you're almost certainly asking the wrong question. - Rasmus Lerdorf
Reply
#3
The fact is, MyBB 1.8 moved from Prototype to jQuery in its javascript main library. JS code designed for 1.6 won't likely work within 1.8 environment.
[Image: fSGNVQj.png]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)