Hey all, I have a calendar that''s updateable via arrows which make ajax requests. The calendar is included in page using a partial, and the calendar loads fine, no problems. The arrows which make ajax requests call an action in the same controller which sets a new datestring five days in the future. There is a .rjs view associated with this action that renders the same partial I mentioned before. Everything works fine, except I appear to be getting the source of the javascript, instead of the output from the view, so the calendar is filled with the try/catch statement, and all the values for the calendar are escaped (I can see the escaped quotes in the browser view). Can anyone tell me what I''m doing wrong? -josh --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Josh Stephenson wrote:> Hey all, > > I have a calendar that''s updateable via arrows which make ajax > requests. The calendar is included in page using a partial, and the > calendar loads fine, no problems. The arrows which make ajax requests > call an action in the same controller which sets a new datestring five > days in the future. There is a .rjs view associated with this action > that renders the same partial I mentioned before. > > Everything works fine, except I appear to be getting the source of the > javascript, instead of the output from the view, so the calendar is > filled with the try/catch statement, and all the values for the > calendar are escaped (I can see the escaped quotes in the browser > view). > > Can anyone tell me what I''m doing wrong? > > -josh > > > >Check the code you are using on the arrow clicks, chances are you are using an :update => ''mydivname''. Get rid of the :update and its value, your RJS should be telling the page which div to update so this is redundant and is causing your javascript to print instead of run. There are a few other potential causes of this error but what I suggest is the most likely solution. Let us know if that does not work out for you. Best of luck, Matt Margolis blog.mattmargolis.net --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
yup....you''re right....removing :update => ''calendar'' did it. thanks! On 2/2/07, Matthew Margolis <mrmargolis-63mtpxcE9Cs@public.gmane.org> wrote:> > Josh Stephenson wrote: > > Hey all, > > > > I have a calendar that''s updateable via arrows which make ajax > > requests. The calendar is included in page using a partial, and the > > calendar loads fine, no problems. The arrows which make ajax requests > > call an action in the same controller which sets a new datestring five > > days in the future. There is a .rjs view associated with this action > > that renders the same partial I mentioned before. > > > > Everything works fine, except I appear to be getting the source of the > > javascript, instead of the output from the view, so the calendar is > > filled with the try/catch statement, and all the values for the > > calendar are escaped (I can see the escaped quotes in the browser > > view). > > > > Can anyone tell me what I''m doing wrong? > > > > -josh > > > > > > > > Check the code you are using on the arrow clicks, chances are you are > using an :update => ''mydivname''. Get rid of the :update and its value, > your RJS should be telling the page which div to update so this is > redundant and is causing your javascript to print instead of run. There > are a few other potential causes of this error but what I suggest is the > most likely solution. Let us know if that does not work out for you. > > Best of luck, > Matt Margolis > blog.mattmargolis.net > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---