Ajax open command

I am trying to call a php page using AJAX and it fails. I tested this by writing
if(ajaxRequest.open(“GET”, “page.php?q=”+s, true) alert("Success
") ;
else alert(“fail”);
and I got the fail messege.
I am not an expert in AJAX, php is more my thing and was wondering if any of the brilliant :slight_smile: people here will be able to find out what the problem is.
the PHP code works fine, i tested it regardless of the AJAX.

the code is as follows:[/B]

function validateZip(zip) {
	if(zip == "ZIP CODE" || zip == "")
		alert("Please insert a zip code");
    var ajaxRequest; 
    try {
        // Opera 8.0+, Firefox, Safari
        ajaxRequest = new XMLHttpRequest();
    } catch (e) {
        // Internet Explorer Browsers
        try {
            ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
        } catch (e) {
            try {
                ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
            } catch (e) {
                // Something went wrong
                alert("Your browser broke!");
                return false;

          ajaxRequest.onreadystatechange = function () {
		var resp;
        if (ajaxRequest.readyState == 4&&ajaxRequest.status==200) {
		resp = ajaxRequest.responseText;
		if (resp == "1") {
                } else {
		zipCurrent = resp;

    ajaxRequest.open("GET", "checkzipPnina.php?q="+zip, true);

I would use the JQuery library and do it this way:

$.get(‘checkzipPnina.php?q=’ + zip, function(data) {
alert (data);

Figured it out…
Apparantly the JS was skipping the AJAX, when I set the lthird parameter in the AJAX open command it worked!