I have to develop a web page using frames and JavaScript. In that page I need to get the entire HTML code of frame1 using JavaScript into a variable in frame 2. Both frames belong to the same web page. How can I get that done? Please answer. Thank you --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
On May 18, 10:20 am, Trinath <yerra.trin...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I have to develop a web page using frames and JavaScript. > In that page I need to get the entire HTML code of frame1 using > JavaScript into a variable in frame 2. Both frames belong to the > same web page. > How can I get that done?Set the src property of frame 2 to be the same as frame 1. -- Rob --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
This is a generic Javascript question--rather than asking on this list (one specific to the Prototype and Scriptaculous libraries), you should do a couple of things first: - Google your question. (GIYF) - Ask on a Javascript help forum/list The following links should make your search a bit easier: http://www.google.com/search?q=javascript%20frames http://www.quirksmode.org/js/frameintro.html Both frame1 and frame2 should be able to access each other''s content "automagically," using the pre-populated variables self, parent, and top. If you''ve named your frame "frame1", some variation of this should probably work: var tmp = top.frame1.document.body.innerHTML; Works for iframes too. TAG On May 17, 2007, at 6:20 PM, Trinath wrote:> > I have to develop a web page using frames and JavaScript. > In that page I need to get the entire HTML code of frame1 using > JavaScript into a variable in frame 2. Both frames belong to the > same web page. > How can I get that done? > Please answer. Thank you > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---