Welcome Guest, Not a member yet? Register   Sign In
CI returns invisible symbol string to jquery ajax
#1

[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.


Messages In This Thread
CI returns invisible symbol string to jquery ajax - by El Forum - 01-05-2011, 03:24 PM
CI returns invisible symbol string to jquery ajax - by El Forum - 01-05-2011, 09:58 PM
CI returns invisible symbol string to jquery ajax - by El Forum - 01-06-2011, 02:23 AM
CI returns invisible symbol string to jquery ajax - by El Forum - 01-06-2011, 09:09 AM
CI returns invisible symbol string to jquery ajax - by El Forum - 01-07-2011, 09:58 AM
CI returns invisible symbol string to jquery ajax - by El Forum - 01-07-2011, 10:01 AM
CI returns invisible symbol string to jquery ajax - by El Forum - 01-07-2011, 01:58 PM



Theme © iAndrew 2016 - Forum software by © MyBB