[eluser]Edgars[/eluser]
Don't know if It's Jquery or CI, but I have a situation.
I have simple controller with function
Code:
function eds (){
echo "edgars";
}
And I have html file with javascript and Jquery ajax in it.
Code:
function eds (){
$.ajax({
url: '/index.php/hangman_controller/eds',
success: function(data) {
here is alert with data length. forums doesnt allow sumbit it
}
});
}
Everything works fine but alert is not returning 6 but 9. All those empty chars is in front of string. alert(data[0]), alert(data[1]), alert(data[2]) return nothing. after that 3, 4 it goes as it should.
I checked length in CI before sending it to AJAX and it was correct.