On Domingo, 6 de Diciembre de 2009 23:25:36 ruinen escribió: > OK so I think I am nearly there. > > If I put the script in _horizontal_subform_header.html.erb then > although it doesn't appear in the HTML source, it seems it is getting > executed. > > It is just that I am using document.observe. So without > document.observe, the code works when the form loads as Ajax, but > doesn't work using direct URL. > > With document.observe, the code doesn't work when the form loads as > Ajax, but does work using direct URL.
Look at lowpro and Event.onReady, it observe dom:loaded, but if document is already loaded execute the function inmediately. You can copy that function, or use lowpro -- Sergio Cambra .:: entreCables S.L. ::. Mariana Pineda 23, 50.018 Zaragoza T) 902 021 404 F) 976 52 98 07 E) [email protected] -- You received this message because you are subscribed to the Google Groups "ActiveScaffold : Ruby on Rails plugin" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/activescaffold?hl=en.
