Cakephp更新div

I have a view listing something with some hidden div elements. The hidden div have some data. While showing the hidden div i need to update the div element's text or label? how to do this?

You're going to need to use AJAX to request information from (probably) a controller within your application. Then, when you get the AJAX response, you can fill in the div.

You're going to need some knowledge with Javascript, and you may be able to mitigate the learning process a bit by using a framework like jQuery.

Do some googling regarding AJAX calls, hiding and showing divs, and posting ajax requests, etc. There are many useful guides throughout the interwebs.

You can update the content of any HTML object by using the JS code; object.innerHTML="New Text";

For more detailed help I would refer to Dr. Lecter's comment above.

I would recommend using jquery. javascript can be a pain to code and maintain.

To update elemente with strings, html, etc.. check out the following page:

http://docs.jquery.com/Attributes/html#val