Hi, I need the information to create frames in erb rails. I need to display the links in a frames instead of provide as link to new window. Eg. <a href="taxas?[gm]=<%= prefer.name %>&[sp]=<%= prefer.sp%>" target="new">Link </a> This should be modified as <frameset rows="25%,75%"> <frame src="taxas?[gm]=<%= prefer.name %>&[sp]=<%= prefer.sp %>"> </frame>. </frameset> I dont need to open a html or new file. The source file will be same and params will be changed. Kindly correct the above frameset operations. Its not creating frames. Kindly suggest me your vision on this issue. -- With Regards, Palani Kannan. K, -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Oct 28, 2010, at 7:28 AM, PalaniKannan K wrote:> Hi, > > I need the information to create frames in erb rails. > > I need to display the links in a frames instead of provide as link > to new window. > > Eg. > > <a href="taxas?[gm]=<%= prefer.name %>&[sp]=<%= prefer.sp%>" > target="new">Link </a> > > This should be modified as > > <frameset rows="25%,75%"> > <frame src="taxas?[gm]=<%= prefer.name %>&[sp]=<%= prefer.sp %>"> </ > frame>. > > </frameset> > > I dont need to open a html or new file. The source file will be same > and params will be changed. > Kindly correct the above frameset operations. Its not creating > frames. Kindly suggest me your vision on this issue. > -- > With Regards, > Palani Kannan. K,Step back and ask yourself what problem you are intending to solve by using frames. If it''s a user interface thing (scrolling area within a larger page) then you can solve that easily with CSS. If it''s accessing one view within another, then look into partials -- this can be a very elegant way to solve this problem within a single flat page. Frames are such a mess to work with in any case, both for you and your users, because they don''t provide a single URL for a single view. Your Rails app would have to create an outer frameset page, then a separate frame src page for each pane of that frameset. What holds these together? What signals the default content for each sub-frame? If you''ve got any sort of dynamic content happening within these frames, what method are you using to glue them all together? If the user updates one frame, how does that signal back to the others (if any updates are necessary)? If the user updates one frame or navigates within that frame, can she ever get back to a default page showing this combination of information? Please say a little more about your application, what it does, and why frames are the solution in your case. Thanks, Walter -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hi Walter, Your suggestion and queries are valuable. I accept your suggestion over frames. As u asked the main problem, Main requirement -> render the same source with different params in a single page as second table output. I tried with render : ''index'', :params => {:gm => prefer.name, :sp => sp}. But I am getting "double rendering error". As render option fails with above requirement, I choosed frames to render the different params to execute with same source. If you have idea to render the same source file with different params, Kindly give me suggestion. -- With Regards, Palani Kannan. K, -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Oct 28, 2:56 pm, PalaniKannan K <kpalanikan...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Main requirement -> render the same source with different params in a single > page as second table output. I tried with > > render : ''index'', :params => {:gm => prefer.name, :sp => sp}. > > But I am getting "double rendering error". As render option fails with above > requirement, I choosed frames to render the different params to execute with > same source. If you have idea to render the same source file with different > params, Kindly give me suggestion.split your output into partials? Then from your view you can render your various partials in as many different ways that are needed Fred> -- > With Regards, > Palani Kannan. K,-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Oct 28, 2010, at 11:53 AM, Frederick Cheung wrote:> > > On Oct 28, 2:56 pm, PalaniKannan K <kpalanikan...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> Main requirement -> render the same source with different params in >> a single >> page as second table output. I tried with >> >> render : ''index'', :params => {:gm => prefer.name, :sp => sp}. >> >> But I am getting "double rendering error". As render option fails >> with above >> requirement, I choosed frames to render the different params to >> execute with >> same source. If you have idea to render the same source file with >> different >> params, Kindly give me suggestion. > > split your output into partials? Then from your view you can render > your various partials in as many different ways that are neededIf you''re working in TextMate, there''s a macro built in that will do this for you. Highlight a section of the main view, choose Bundles/ Ruby on Rails/ERb Templates/Create Partial From Selection. It will prompt you for a partial name, then replace the snippet with a proper render call and create the properly-named partial in one go. Blammo. Done. Walter -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Walter Davis wrote in post #957778:> Frames are such a mess to work with in any case, both for you and your > users, because they don''t provide a single URL for a single view.Also, frames on certain devices (e.g. iPhone) can be more than a "mess to work with." Make every effort to avoid them. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hello Walter Davis, I donot need ant dynamic content processings among the frames. i need to display to different independent static views(pages) How am i supposed to do that? -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
On Jan 2, 2013, at 12:33 AM, Anon H. wrote:> Hello Walter Davis, > I donot need ant dynamic content processings among the frames. i need to > display to different independent static views(pages) > How am i supposed to do that?Do you understand how to write a frameset page by hand? You can make one in a Rails View, just like any other type of HTML. You''ll need to specify that you don''t want a template, and you''ll need to work out how you want to transfer your various URLs (one per frame) to the frameset page, but that''s really just a data-marshalling exercise. Start by writing the frameset you want to end up with as a single HTML file. Make sure it works without Rails. Then start pulling out the very few bits of data you need to use Rails to provide, and figure out what your controller will need to look like to provide those bits. You should be able to walk backwards into having Rails generate the frameset if you start there. Walter -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
This is what I am using in one of my projects. It should''t be problem to make it in erb. -------------------------------- def iframe_helper(if_name) opts = { controller: ''somectrl'', action: ''index'', id: @record.id, iframe: "if_#{if_name}" } html = "<iframe class=''iframe_embedded'' id=''if_#{if_name}'' name=''if_#{if_name}''></iframe>" html << <<EOJS <script type="text/javascript"> $(document).ready( function() { $(''#if_#{if_name}'').attr(''src'', ''#{url_for(opts)}''); }); </script> EOJS html.html_safe end ---------------------------------- In short: opts = Hash to make url to display in frame. iframe html code. if_name=name of iframe. javascript part which loads iframe code by calling url when document is loaded. You need jquery for all this to work. by TheR -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.