I''ve got a partial with a form using the dynarch calendar (calendar_field behavior). Working. Now I render this partial from the action specified in to a link_to_remote. Now when I click the calendar it''s not showed anymore. theese lines: <%= stylesheet_link_tag ''calendar-system.css'' %> <%= javascript_include_tag ''calendar'', ''calendar-it'', ''calendar-setup'' %> are in the standard layout that I''m using. I''ve tried writing them in the partial but nothing is changed. The firefox js debug console say nothing when I click the calendar button. Someone have a suggestion? Thanks, Enrico -- "The only thing necessary for the triumph of evil is for good men to do nothing" Edmund Burke
Are you using Michael Schuerig''s Calendar Helper ? http://wiki.rubyonrails.com/rails/show/CalendarHelper jean On 6/21/05, Enrico Teotti <agenteo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''ve got a partial with a form using the dynarch calendar > (calendar_field behavior). Working. > Now I render this partial from the action specified in to a link_to_remote. > Now when I click the calendar it''s not showed anymore. > > theese lines: > <%= stylesheet_link_tag ''calendar-system.css'' %> > <%= javascript_include_tag ''calendar'', ''calendar-it'', ''calendar-setup'' %> > are in the standard layout that I''m using. I''ve tried writing them in > the partial but nothing is changed. > > The firefox js debug console say nothing when I click the calendar button. > > Someone have a suggestion? > > Thanks, > Enrico > > > -- > "The only thing necessary for the triumph of evil > is for good men to do nothing" > Edmund Burke > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
We ran into the same problems when trying to implement a rich text editor with AJAX. Javascript is flaky when you''re inserting content dynamically into a DIV... probably the initialization functions are not being called at the right time. If the init function is inline, try extracting it to the layout code and then calling it after updating the contents. Let me know if you get anywhere with this. We still haven''t gotten the RTE working the way we want it to :( - Ben On Jun 21, 2005, at 6:41 AM, Enrico Teotti wrote:> I''ve got a partial with a form using the dynarch calendar > (calendar_field behavior). Working. > Now I render this partial from the action specified in to a > link_to_remote. > Now when I click the calendar it''s not showed anymore. > > theese lines: > <%= stylesheet_link_tag ''calendar-system.css'' %> > <%= javascript_include_tag ''calendar'', ''calendar-it'', ''calendar-setup'' > %> > are in the standard layout that I''m using. I''ve tried writing them in > the partial but nothing is changed. > > The firefox js debug console say nothing when I click the calendar > button. > > Someone have a suggestion? > > Thanks, > Enrico > > > -- > "The only thing necessary for the triumph of evil > is for good men to do nothing" > Edmund Burke > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Here is an ugly workaround I''m using to call the initialialization function: In the link_to_remote that inserts into the div I use: :complete => ''Calendar.setup({ inputField:"your_input_field_id",button:"your_calendar_button_id" })'' It''s ugly but I''ve only needed this once so far. On 6/21/05, Ben Jackson <ben-p14LI7ZcAE/pVLaUnt/cCQC/G2K4zDHf@public.gmane.org> wrote:> > We ran into the same problems when trying to implement a rich text > editor with AJAX. Javascript is flaky when you''re inserting content > dynamically into a DIV... probably the initialization functions are not > being called at the right time. If the init function is inline, try > extracting it to the layout code and then calling it after updating the > contents. > > Let me know if you get anywhere with this. We still haven''t gotten the > RTE working the way we want it to :( > > - Ben > > On Jun 21, 2005, at 6:41 AM, Enrico Teotti wrote: > > > I''ve got a partial with a form using the dynarch calendar > > (calendar_field behavior). Working. > > Now I render this partial from the action specified in to a > > link_to_remote. > > Now when I click the calendar it''s not showed anymore. > > > > theese lines: > > <%= stylesheet_link_tag ''calendar-system.css'' %> > > <%= javascript_include_tag ''calendar'', ''calendar-it'', ''calendar-setup'' > > %> > > are in the standard layout that I''m using. I''ve tried writing them in > > the partial but nothing is changed. > > > > The firefox js debug console say nothing when I click the calendar > > button. > > > > Someone have a suggestion? > > > > Thanks, > > Enrico > > > > > > -- > > "The only thing necessary for the triumph of evil > > is for good men to do nothing" > > Edmund Burke > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Rafael Rezende _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails