all required files (CSS and JS) are well included in first place, but they seem "unavailable" when in the updated div context. Here is a typical chain of actions:
- fooAction: sfDynamics::load('jquery.fancybox') - fooActionSuccess: <a class="some_fancybox_class" href="selectContactAction?div=contact">Select Contact</a> ---> this links triggers the "lightbox" with list of contacts - I click on a contact in the lightbox, it updates the "contact" div (wich is on fooActionSuccess) - within the contact div, I have a modify link : <a class="some_fancybox_class" href="selectContactAction? div=contact">Modify Contact</a> ---> this link does not trigger the lightbox. indeed, no JS seems to be passed from the fooActionSuccess page I did try to set sfDynamics::load('jquery.fancybox') also in the action that updates the contact div, but it does not help, I cant get any JS to work in a "ajax called" div, unless I reload all classes & css everytime I update the div.. it seems this project is common with JS not working on an ajax "produced" page, I found threads about that problem (http:// www.dynamicdrive.com/forums/archive/index.php/t-19555.html), but I thought that sfdynamics would handle that problem somehow On Dec 2, 8:12 pm, Eno <symb...@gmail.com> wrote: > On Wed, 2 Dec 2009, artmajeur wrote: > > Problem: > > after the lighbox action is hidden, the contact_div is filled with the > > appropriate info, but the "modify" link, supposedly the same as the > > one used in first place to trigger the lighbox, does not work. > > > It looks like symfony does not load the sfDynamics::load > > ('jquery.SCRIPTNAME') library in the ajax action, so the CSS ans JS > > are not available in the rendered Ajax Div. > > Sounds like you're expecting an AJAX action to load scripts and css, but > AJAX actions typically don't and symfony does not use the layout for those > actions either. > > > My Current "solution": > > I reaload manually the dynamics JS and CSS needed for the lightbox, > > directly in the template, wich does work but also sucks. > > Why? AJAX assumes your page already has the scripts an d CSS it needs to > update the page. So they should already be loaded when you call your AJAX > action. > > -- -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.