How do you show dynamic code based on a dropdown in a persistent way with yii? How do you show dynamic code based on a dropdown in a persistent way with yii? ajax ajax

How do you show dynamic code based on a dropdown in a persistent way with yii?


I had this problem before as well.

The problem lies in the .bind('change'), you should use .live('change') instead,In jQuery 1.7 this is solved by using the .on() function that does both live and normal binds.Unforgettably Yii doesnt have the latest jQuery. For some projects i updated jQuery manually but keep in mid you will have to extend base classes to fix jQuery errors you'll get.For a more direct and one time solution you could write a bit of js, that unbinds your events on the elements and then re-bind them with the .live() function.But its all a bit hacky to say the least.