Hi. I am doing a web project for my school. I have models like Forum, Student, Event, Teacher, etc. Users are allowed to go to these models only after logging in so that they can view and update their details, create events, topics in forums, etc. My page has a header, a menu bar, a content-container and a footer in the page. The content container has a left sidebar and a content div to contain the rendered content. The left side bar has links to Forum, Student, Event, Teacher, etc inside a partial.This is contained in the main layout. Everything is going fine. What i need to know is how can i implement the same layout with only refreshing the content div and not the entire page without using rjs(i can use Prototype javascript library). Thanks in advance. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Sat, Jul 5, 2008 at 2:55 PM, Rock Roll <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Hi. I am doing a web project for my school. I have models like Forum, > Student, Event, Teacher, etc. Users are allowed to go to these models > only after logging in so that they can view and update their details, > create events, topics in forums, etc. > My page has a header, a menu bar, a content-container and a footer > in the page. The content container has a left sidebar and a content div > to contain the rendered content. The left side bar has links to Forum, > Student, Event, Teacher, etc inside a partial.This is contained in the > main layout. Everything is going fine. What i need to know is how can i > implement the same layout with only refreshing the content div and not > the entire page without using rjs(i can use Prototype javascript > library).You need to research and learn about AJAX requests. The function you are going to use for prototype is ''new Ajax.request(''url...'')'' Go read up on this at http://www.prototypejs.org/api/ajax/request Mikel -- http://lindsaar.net/ Rails, RSpec and Life blog.... --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Mikel Lindsaar wrote:> On Sat, Jul 5, 2008 at 2:55 PM, Rock Roll > <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: >> the entire page without using rjs(i can use Prototype javascript >> library). > > You need to research and learn about AJAX requests. > > The function you are going to use for prototype is ''new > Ajax.request(''url...'')'' > > Go read up on this at http://www.prototypejs.org/api/ajax/request > > Mikel > > -- > http://lindsaar.net/ > Rails, RSpec and Life blog....Thanks for your reply. I know about implementing AJAX using rails using the prototype helpers. But i want to use a single page for accessing Forum, Student, Event, Teacher, etc with only the respective view templates for the CRUD actions, appearing in the content area without complete page refresh. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Sat, Jul 5, 2008 at 4:41 PM, Rock Roll <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Mikel Lindsaar wrote: > Thanks for your reply. I know about implementing AJAX using rails using > the prototype helpers. But i want to use a single page for accessing > Forum, > Student, Event, Teacher, etc with only the respective view templates for > the CRUD actions, appearing in the content area without complete page > refresh.Yes, you can absolutely do this. I did it on an app. Only one page and then all parts refreshing as you go. It gets messy though. You are better off doing the request response thing. For one thing, the back button works again :) Mikel -- http://lindsaar.net/ Rails, RSpec and Life blog.... --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Rock Roll wrote:> Thanks for your reply. I know about implementing AJAX using rails using > the prototype helpers. But i want to use a single page for accessing > Forum, > Student, Event, Teacher, etc with only the respective view templates for > the CRUD actions, appearing in the content area without complete page > refresh.The only way to do it without a page refresh is via AJAX, so you will need to either (1) use an existing library which makes this easier (Prototype, JQuery, or something else), or (2) reinvent the wheel and write all of the JavaScript yourself. Peace, Phillip -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On 05 Jul 2008, at 14:21, Phillip Koebbe wrote:>> Thanks for your reply. I know about implementing AJAX using rails >> using >> the prototype helpers. But i want to use a single page for accessing >> Forum, >> Student, Event, Teacher, etc with only the respective view >> templates for >> the CRUD actions, appearing in the content area without complete page >> refresh. > > The only way to do it without a page refresh is via AJAX, so you will > need to either (1) use an existing library which makes this easier > (Prototype, JQuery, or something else), or (2) reinvent the wheel and > write all of the JavaScript yourself.... or worship the devil and resort to iframes. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Peter De Berdt wrote:> > ... or worship the devil and resort to iframes.Heh heh :) I''ve always avoided iframes like the plague (and the devil ;) ), so that possibility didn''t cross my mind. Thanks Peter! Phillip -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---