By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,725 Members | 1,209 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,725 IT Pros & Developers. It's quick & easy.

flip/flop contents of a frame ?

P: n/a
Hi.
I have a frameset with 3 frames that look like a T, with the top frame
containing buttons like a toolbar, the left frame usually containing a
dynamic TOC and the right frame containing the documents to view. In
the toolbar, I have a button that starts a search engine which results
I want to display in the left frame, hiding the TOC. Two buttons in the
toolbar should help choose to display either the TOC or the search
results in the left frame, but without reloading the TOC from the
server nor restarting the search engine.
Is there a way to achieve this?
Thanks.

Feb 24 '06 #1
Share this Question
Share on Google+
6 Replies


P: n/a
On 24 Feb 2006, Yv*****************@bull.net wrote:
I have a frameset with 3 frames [...]


Get rid of frames! Otherwise you are in bad company:
http://google.com/search?q=%22This+page+uses+frames%22
finds about 24*000*000 fools.

--
All free men, wherever they may live, are citizens of Denmark.
And therefore, as a free man, I take pride in the words "Jeg er dansker!"

Feb 24 '06 #2

P: n/a
<Yv*****************@bull.net> wrote in message
news:11********************@v46g2000cwv.googlegrou ps.com...
Hi.
I have a frameset with 3 frames that look like a T, with the top frame
containing buttons like a toolbar, the left frame usually containing a
dynamic TOC and the right frame containing the documents to view. In
the toolbar, I have a button that starts a search engine which results
I want to display in the left frame, hiding the TOC. Two buttons in the
toolbar should help choose to display either the TOC or the search
results in the left frame, but without reloading the TOC from the
server nor restarting the search engine.
Is there a way to achieve this?
Thanks.


No, not without reloading the page containing the TOC or the search results.
You could use layers and then have them become visible or invisible by
clicking a button but then there would be no purpose in having frames.
IEDesigner
Feb 24 '06 #3

P: n/a
So. Here comes another idea: create 3 vertical frames, the first one
with a width of 0 (or 1), holding the search results, the second with a
width of 300, holding the TOC, and the third with a width of what's
left for documents. How can I program my 2 buttons in the toolbar to
switch the width of the first and second frames (whatever browser is
used)?

Feb 27 '06 #4

P: n/a
<Yv*****************@bull.net> wrote in message
news:11*********************@j33g2000cwa.googlegro ups.com...
So. Here comes another idea: create 3 vertical frames, the first one
with a width of 0 (or 1), holding the search results, the second with a
width of 300, holding the TOC, and the third with a width of what's
left for documents. How can I program my 2 buttons in the toolbar to
switch the width of the first and second frames (whatever browser is
used)?


It may be possible to do what you ask with JS. I'm not a JS guru so for me
finding a solution might take some time. I would start with an onClick event
that would change the width of two frames simultaneously. Try asking your
question in news:comp.lang.javascript
IEDesigner
Feb 27 '06 #5

P: n/a
You're right. Thanks.

Feb 28 '06 #6

P: n/a
I finally found the solution: my 2 buttons have the following links:
<a href=javascript:ShowTOC(); return true;>
<a href=javascript:ShowRes(); return true;>
and the ShowTOC and ShowRes functions look like (MiddleFrame being the
ID I gave the inner frameset):
function ShowTOC() {
parent.document.getElementById("MiddleFrame").cols = "0,300,*";
}
function ShowRes() {
parent.document.getElementById("MiddleFrame").cols = "300,0,*";
}
and all goes like a breeze...

Feb 28 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.