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 4 1539
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
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_display?vals=lotsofstuff" 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
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:hidden, 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_display?vals=lotsofstuff" 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
Thank you so much for your time and the link, RobG.
Ann This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
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,...
|
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...
|
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...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |