I have a div named __cart. This div contains the product list along with tiny + and - buttons. With these the user can increase / decrease the quantities by ajax. This works fine for the existing products, the problem comes when new products are added - by ajax - to this div!
The problem comes when the user adds a new item to the cart. The cart is updated via ajax and the new products generate new id’s. The ajax link doesn’t work for new items since there is no script for them in the bottom of the old html document body.
How to solve this problem?
How do I generate script(s) for the new ajax links and how do I include these in the old html document body???
When the controller is missing, it is replaced with the current. It’s working fine. But the problem isn’t this. The problem is that the newly created ajax link doesn’t has it’s corresponding script on the bottom of the html body. Is there a way to include script in the updated div?
I was debugging the application and for some reason (I haven’t found out why) the following line, in CHtml class when self::clientChange is called within ajaxLink, is not kicking in: