My main page is a list of posts, but I decided to make the “create” page a modal lightbox-style popup. Not really a problem—I just make a DIV appear when they hit “create” and I load in www.mysite.com/post/create into that DIV. I have set my create.php page to “renderPartial” so that the DIV doesn’t include all the header, logo etc.
Trouble is that when I load a widget on that lightbox create page, it doesn’t seem to insert its code correctly. Specifically, I am using the muploadify widget, which, when called on a page using $this->render, seems to inject its Javascript at the bottom of the page. But when I use $this->renderPartial, it doesn’t.
I presume that Yii is doing some trickery about how and where it injects Javascript that is simply missing if I load a page in dynamically into a DIV?
Hmm… thanks, but that did not seem to do the trick. I still don’t get any injected Javascript. I guess the question is, with a widget like MUploadify, where does it inject its Javascript? Because if I call the create page directly using renderPartial there is no Javascript at the bottom, but if I call it using render then I see a whole lot of added code at the bottom.