Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old February 24th, 2006, 05:25 PM
Yves-Alain.Nicollet@bull.net
Guest
 
Posts: n/a
Default flip/flop contents of a frame ?

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.

  #2  
Old February 24th, 2006, 05:25 PM
Andreas Prilop
Guest
 
Posts: n/a
Default Re: flip/flop contents of a frame ?

On 24 Feb 2006, Yves-Alain.Nicollet@bull.net wrote:
[color=blue]
> I have a frameset with 3 frames [...][/color]

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!"

  #3  
Old February 24th, 2006, 08:25 PM
IEDesigner
Guest
 
Posts: n/a
Default Re: flip/flop contents of a frame ?

<Yves-Alain.Nicollet@bull.net> wrote in message
news:1140800955.713523.9190@v46g2000cwv.googlegrou ps.com...[color=blue]
> 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.[/color]

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


  #4  
Old February 27th, 2006, 04:15 PM
Yves-Alain.Nicollet@bull.net
Guest
 
Posts: n/a
Default Re: flip/flop contents of a frame ?

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)?

  #5  
Old February 27th, 2006, 07:15 PM
IEDesigner
Guest
 
Posts: n/a
Default Re: flip/flop contents of a frame ?

<Yves-Alain.Nicollet@bull.net> wrote in message
news:1141056351.877360.79040@j33g2000cwa.googlegro ups.com...[color=blue]
> 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)?[/color]

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


  #6  
Old February 28th, 2006, 08:15 AM
Yves-Alain.Nicollet@bull.net
Guest
 
Posts: n/a
Default Re: flip/flop contents of a frame ?

You're right. Thanks.

  #7  
Old February 28th, 2006, 10:25 AM
Yves-Alain.Nicollet@bull.net
Guest
 
Posts: n/a
Default Re: flip/flop contents of a frame ?

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...

 

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles