I try to load elements from CakePHP ($this->elements()) with the jQuery function .load() but I have prolems figuring out the paths to those elements. I found some other topics here on this site, but they didnt help me really.
The root is /webroot isn’t it? I tried then .load('../View/Elements/Summoners/comments.ctp'); and some other paths but they didn’t work out :/
Don’t load the element from jQuery, but call a controller method that will load the element. For example. In jQuery call something like:
Then in the controller that corresponds to ajax_action, you can either let it load the view it is calling or load the element like so: