ajax help - cant translate javascript ajax to jquery.

ajax help - cant translate javascript ajax to jquery.

HI guys.... first post.

I have this jscript function:

function ajax_write(url){
if(window.XMLHttpRequest){
xmlhttp2=new XMLHttpRequest();
if(xmlhttp2.overrideMimeType){
xmlhttp2.overrideMimeType('text/xml');
}
} else if(window.ActiveXObject){
try{
xmlhttp2=new ActiveXObject("Msxml2.XMLHTTP");
} catch(e) {
try{
xmlhttp2=new ActiveXObject("Microsoft.XMLHTTP");
} catch(e){
}
}
}

if(!xmlhttp2) {
alert('Giving up Cannot create an XMLHTTP instance');
return false;
}

xmlhttp2.open('GET',url,true);
alert(url);
xmlhttp2.send(null);
}


AND I THOUGHT I COULD JUST USE JQUERY TO DO THE SAME THING LIKE THIS:

//function ajax_write(url2) {
//
// alert(url2);
//
// $.ajax({
// type: "GET",
// url: url2,
//
// });
//
//}


**without the comments obviously....

But it doesnt work. The file it is going to is in php and I did not write it but it is just looking for two variable "m" and "n" both of which are in my get string.

I put alerts in both methods and I am sending the same exact string...

This is simpy writing a text message into a text file but the JQuery ajax one is not working.

Can anyone see what I am doing wrong?

Thanks for any help!