hi

I have an ajax function with the following code, which is all working perfectly, apart from one url link in it:

Code:
function ajaxFunctionGetCredit(){
	
	tryAjax();
	
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
		if(ajaxRequest.readyState == 4){
		
			var ajaxCredit = ajaxRequest.responseText;		//ajaxRequest.status;
			document.SMSForm.credit.value=ajaxCredit;
			document.SMSForm.credit1.value=ajaxCredit;
			document.SMSForm.credit2.value=ajaxCredit;

		}
	}
	var myUserkey = document.SMSForm.Userkey.value;
	var myPassword = document.SMSForm.Password.value;
	var queryString = "?Userkey=" + myUserkey + "&Password=" + myPassword;
	
	ajaxRequest.open("GET", "modules/SytekSMS/ajaxRreturnCredit.php" + queryString, true);
	ajaxRequest.send(null); 


}
now the bit that is the problem is this bit:

Code:
ajaxRequest.open("GET", "modules/SytekSMS/ajaxRreturnCredit.php" + queryString, true);
basically this link

"modules/SytekSMS/ajaxRreturnCredit.php"

is wrong, i know this because if i just put

"ajaxRreturnCredit.php"

and have the file in the main sugar folder then it works! i have no idea why this is not working properley? my module is in the modules folder and my module is in a folder called SytekSMS,

can anybody see the problem because this one has got me boggled!

thanks - andrew