Welcome Guest, Not a member yet? Register   Sign In
Chain selection with jquery-1.4.4.min does not work on v2.1.2, it works on v1.7.3

[eluser]Julia Yan[/eluser]
I have 3 levels of chain selection with jquery-1.4.4.min, system upgrade from v1.7.3 to v2.1.2
Then chain selection(echo json_encode($data['children'])Wink does not work, only shows first level???

Spend 2 days could not find any bug?

Thanks for any help

Because CodeIgniter simply outputs what you tell it to, and that includes HTML, CSS, and requests for javascript files, CodeIgniter itself is not responsible for any bugs you are experiencing. Those bugs would be in your own code, which could be in controllers, views, or javascript in various locations.

I normally use json_encode to send my responses back to the browser, and if the response is the sole parameter of the success function, and for demonstration purposes we name that parameter "response", then the "children" element of the $data array you have json encoded ends up being accessible via response.children.

If you were to show some code, we may be able to help you. Why not share your javascript, the method that processes the request in your controller, etc.

Also, keep in mind that if you have CI's CSRF protection turned on, you will need to send the token along with the request. I believe this was a major change between the two versions you are asking about.

[eluser]Julia Yan[/eluser]
Thanks for your reply, and which means my code meet v1.7.3, does not meet v2.1.2?
$config['csrf_protection'] = FALSE;//or TRUE; both nothing happened

However, I find error code with firebug and fixed it.
So it is totally mistake with code without CI version. Sorry about it.

Thanks again skunkbad!!!


Have you tried using Firebug or another network activity logger to see the raw ajax response? How does it compare to what you expect?

Theme © iAndrew 2016 - Forum software by © MyBB