Welcome Guest, Not a member yet? Register   Sign In
Quick JS Question
#2

[eluser]CroNiX[/eluser]
Its because your are sending php arrays to the javascript.
In your controller, use something like
echo json_encode(array('result' => $category));

Then in your javascript callback...

function(data){
alert(data.result.category_name); //now you use javascript object
}

Don't forget to set the "type" of your $.post to "json"


Messages In This Thread
Quick JS Question - by El Forum - 01-13-2011, 12:57 PM
Quick JS Question - by El Forum - 01-13-2011, 01:14 PM
Quick JS Question - by El Forum - 01-13-2011, 01:28 PM



Theme © iAndrew 2016 - Forum software by © MyBB