Hi,
im working with jquery.get, im sending to a php file a quest of the numbers of rows of a data base table, and the value that returns its correct, i can work with that inside the funcion jQuery.get, but i dont know how to work with that variable out of .get, i mean, i dont know how to pass out the variable, i tried with oop like this:
- function contarRegistros(){
this.num=1;
this.contar = function (tabla){
$.get("numeroRegistros.php",{tab:tabla},function(dato){
contarr.setNum(dato);
});
}
this.setNum = function (numero){
contarr.num = numero;
}
this.getNum = function (){
return this.num;
}
}
and doesnt work, also i tried with just:
this.num = dato;
in contar function, but also doesnt work.
does anyone know how to do this??