Im really getting so frustrated with this jquery, I want o use the getJson for my ajax but its just not working! its driving me nuts.
i have this, got this from an example:
 $.getJSON("../file.php",{filepath:g_filepath, startRow: "0"},dates);
and also this:
 $.ajax({
                type: "GET",
                url: '../file.php',
                data: param,
                async: true,
                beforeSend: function(x) {
                if(x && x.overrideMimeType) {
                x.overrideMimeType("application/j-son;charset=UTF-8");
                }
            },
            dataType: "json",
            success: function(data){
                //do your stuff with the JSON data
                 alert("called");
            }
            });
Both are just not working, its not getting the reponse.
Can somebody help me.
In my php file codes goes something like this:
$myArray =  array();
 while($filehandle->eof) {
  $line = $filehandle->fgets();
  array_push($myArray, $line);
  echo json_encode($myArray);  
}
am I doing it wrongly?
 
     
     
    