I have the following problem in my javacript
code, I have searched for all kinds of solutions and nothing.
Here I have my code ready and running trial version
ajax.html
there all
var arreglo;
var area = new Array();
var sigla = new Array();
function realizaProceso(){
$.ajax({
data: {},
url: 'http://bioredsky.epizy.com/conexion.php',
type: 'post',
beforeSend: function () {
$("#status").html("Procesando, espere por favor...");
},
success: function (response) {
arreglo = $.parseJSON(response);
}
});
}
var con=0;
while(con<=arreglo.length-1){
area[con]= arreglo[con];
alert("El area es: " + area[con]);
con++;
sigla[con]= arreglo[con];
alert("La sigla es: " +sigla[con]);
con++;
}
my previous test code that is in ajax.html
I copy it in my project in get_turn.js
where I have all the functions of javascript
var arreglo;
var area = new Array();
var sigla = new Array();
function realizaProceso(){
$.ajax({
data: {},
url: 'http://bioredsky.epizy.com/conexion.php',
type: 'post',
beforeSend: function () {
$("#status").html("Procesando, espere por favor...");
},
success: function (response) {
arreglo = $.parseJSON(response);
}
});
}
var con=0;
while(con<=arreglo.length-1){
area[con]= arreglo[con];
alert("El area es: " + area[con]);
con++;
sigla[con]= arreglo[con];
alert("La sigla es: " +sigla[con]);
con++;
}
And this error appears when I inspect the code:
TypeError: fix is undefined
PostData:
1-the code that is in ajax.html works correctly.
2-The libraries also work correctly.
3-the url: http.Bioredsky ..... send an array to the function created in ajax with json_encode.
4- I have initialized Array as a New Arrays, I set it default value and nothing.
5-Url: bioredsky ..... is not the one I'm currently using, I brought them up with that example because I'm not on my pc.
Thank you.