473,802 Members | 2,468 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Cloning entire page to hidden frame

Is it possible using javascript to copy the entire contents of a frame,
at code level, to a hidden frame or even variable or container, so you
can spit it out again instantly to a frame in the future?

I am helping to develop a web application that uses three different
frames, but there is quite a bit of changing of frame sources.
Needless to say, when a frame has its location changes, the "old"
contents are lost. I want to keep them somewhere.

Then, when a user needs to "revisit" the old frame, I want to dump its
contents back to any of three other frames. This will maintain state,
and make for quick "refreshes" .

Is this possible?

Ann

Feb 1 '06 #1
4 1558
Giggle Girl wrote:
Is it possible using javascript to copy the entire contents of a frame,
at code level, to a hidden frame or even variable or container, so you
can spit it out again instantly to a frame in the future?
Why not just set its CSS display property to hidden and have the new
frame display its place? To re-display it, set its display property to
'' (empty string).


I am helping to develop a web application that uses three different
frames, but there is quite a bit of changing of frame sources.
Needless to say, when a frame has its location changes, the "old"
contents are lost. I want to keep them somewhere.

Then, when a user needs to "revisit" the old frame, I want to dump its
contents back to any of three other frames. This will maintain state,
and make for quick "refreshes" .


You can clone the entire frame, but then you run the risk of creating
multiple instances of the same element ID. Presumably you will clone
the content then delete the original - the above hide/show method
achieves that with simplicity.
--
Rob
Feb 1 '06 #2
Hmmm Rob,
I am thinking about what you are saying. Does it work like this:

In a specific frame, have each possible "page" contained in a div tag,
and set all of them to visibility: hidden except the one being used?
Is this right?

If not, please explain what you mean. :)

If it is right, there will be some issues, because the application I am
helping to build does a lot of serverside stuff, and currently passes
many values using a location = "_page_to_displ ay?vals=lotsofs tuff" when
a new page is to be displayed. Having to redo this method may take too
much devleopment time and possibly goes beyond my jurisdiction.

Any more thoughts on this?

Thanks so much,
Ann

Feb 2 '06 #3
Giggle Girl wrote:
Hmmm Rob,
I am thinking about what you are saying. Does it work like this:

In a specific frame, have each possible "page" contained in a div tag,
and set all of them to visibility: hidden except the one being used?
Is this right?
If you use visibility:hidd en, elements still take up room on the page as
if they were still visible. display:none completely removes them from
the flow. Setting display to '' (empty string) puts them back in so
they are visible and take up space again.

If not, please explain what you mean. :)

If it is right, there will be some issues, because the application I am
helping to build does a lot of serverside stuff, and currently passes
many values using a location = "_page_to_displ ay?vals=lotsofs tuff" when
a new page is to be displayed. Having to redo this method may take too
much devleopment time and possibly goes beyond my jurisdiction.

Any more thoughts on this?
What do you do with the 'lots of stuff'? Your original question was
about removing an element and its content from the page, then putting it
back later. Using the display property is one way, another is to
actually remove the element from the page.

Document fragments can be removed and stored by keeping a reference to
them or by creating a document fragment and attaching them to that - see
this thread:

<URL:
http://groups.google.co.uk/group/com...ce856ff314f102


--
Rob
Feb 3 '06 #4
Thank you so much for your time and the link, RobG.

Ann

Feb 3 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1191
by: Mark Andrews | last post by:
What would be the best way to build a little asp page that: displays http://www.yahoo.com waits for 45 seconds displays http://www.google.com loops forever Thanks in advance, Mark
2
11171
by: Alex Hunter | last post by:
Is it possible for one page to access a variable (or text) from another page or frame? How is this done? I want to update a piece of data on one page, and have it update on lots of different pages. I thought I could define the data as a variable on one page, and have all the other pages look at and display the variable from that page. Both pages could be open in a frameset. I have no idea how to do this, Is it possible? Could a...
1
3256
by: bayouprophet | last post by:
Cant get menu script to to put linked page in the same frame. I am new to Java and I am wondering what am I doing wrong? below are my java applet file, frame.html file, and my text file and one of my link file that should load next to the menu on the same page. And Thank You in advance. Here is my menu applet: <html>
7
1520
by: moondaddy | last post by:
I have a products catalogue that I'm putting online and there will be between 20 to 50 different pages of products. Each page contains a datagrid of products for a given category. However, the categories change from time to time so the list of categories must be dynamic and database driven (as is the menu used to select the category to load in the products page). The way I see it there's 2 possible options. dynamically create each aspx...
18
10147
by: Alan Z. Scharf | last post by:
1. I have a chain of six asynch callbacks initiated by a button, and want the page to refresh at the end of each callback to display A. Results of a SQLServer query showing cumulative running time, and B. A progress bar. 2. I have this working with a refresh timer: <META http-equiv="refresh" content="5">
4
1289
by: Axford | last post by:
Hello, does anybody have an example on how to add a hidden frame to an aspx page and then to use thtat hidden frame to print a user friendly version of the web page? The web page does print very bad, because of background pictures and logo's, list's etc.
7
2408
by: GaryDean | last post by:
In my old 1.1 apps the default was MS_POSITIONING="GridLayout" and Textboxes and labels and such always had POSITION: absolute; and I never had any distortion when the page was rendered. Life was good. now in 2.0 I'm using the default placeholder and putting a table in the placeholder and putting controls in the cells in the table. "the way it is supposed to be done" I have a textbox in a table that is defined as follows... <td...
0
9562
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10535
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10303
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10282
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10061
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6838
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5622
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4270
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2966
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.