Collapsible windows

G

Guest

Is there a way for me to add a collapsible window in my web page? What I want
is to have a link open a small window within a current window and give them
the option to close it. I have seen this on sites before, but I could not
find one for an example. Thank you!
 
T

Trevor L.

acfrogg said:
Is there a way for me to add a collapsible window in my web page?
What I want is to have a link open a small window within a current
window and give them the option to close it. I have seen this on
sites before, but I could not find one for an example. Thank you!

You could either open a new window with a close button attached, or use an
Iframe (opened and closed by a button)

To see an example of a new window, go to my site and click on one of the
photos on the top of the page.
For an Iframe click on Open/Close News of this Site. (Close by clicking
again)

The code is on the site, but if you need further info, I can post it
 
R

Rob Giordano \(Crash\)

Do you mean pop-ups?

There's a simple/free add-in for FP called Spawn...
http://www.jimcosoftware.com/addins.aspx

If that's what you mean.



| Is there a way for me to add a collapsible window in my web page? What I
want
| is to have a link open a small window within a current window and give
them
| the option to close it. I have seen this on sites before, but I could not
| find one for an example. Thank you!
 
G

Guest

Thank you both, it's not quite what I mean. I want the box to open within the
same page. I know I'm not explaining it right, I'm trying to find a site that
has what I mean. Thanks for your help
 
T

Trevor L.

acfrogg said:
Thank you both, it's not quite what I mean. I want the box to open
within the same page. I know I'm not explaining it right, I'm trying
to find a site that has what I mean. Thanks for your help

OK, I think I understand.

An Iframe will open in the same window.

See my site
Open/Close News of this Site

Does this do what you want?

If so, the code is
<button onclick="loadIframe('News','news.html')">Open/Close News of this
Site</button>
<iframe class="c1" id="News" src=""></iframe>

where loadIframe is a function which loads the file 'news.html' into the
Iframe 'News'. On the second click it hides the frame
function loadIframe(id,sPath)
{
var x = document.getElementById(id)
if (x.style.display != 'block')
{ x.src = sPath
x.style.display = 'block'}
else
x.style.display = 'none'
}

c1 is a style for the Iframe
..c1 {
display: none;
height: 200px;
width: 400px;
overflow: auto;
}
 
R

Rob Giordano \(Crash\)

I wonder if acfrogg means collapsing paragraphs..sheesh I dunno what they
are called...you know like in FAQs lists? Can't be Iframes since they don't
"open"- since they're always opened.


| acfrogg wrote:
| > Thank you both, it's not quite what I mean. I want the box to open
| > within the same page. I know I'm not explaining it right, I'm trying
| > to find a site that has what I mean. Thanks for your help
|
| OK, I think I understand.
|
| An Iframe will open in the same window.
|
| See my site
| Open/Close News of this Site
|
| Does this do what you want?
|
| If so, the code is
| <button onclick="loadIframe('News','news.html')">Open/Close News of this
| Site</button>
| <iframe class="c1" id="News" src=""></iframe>
|
| where loadIframe is a function which loads the file 'news.html' into the
| Iframe 'News'. On the second click it hides the frame
| function loadIframe(id,sPath)
| {
| var x = document.getElementById(id)
| if (x.style.display != 'block')
| { x.src = sPath
| x.style.display = 'block'}
| else
| x.style.display = 'none'
| }
|
| c1 is a style for the Iframe
| .c1 {
| display: none;
| height: 200px;
| width: 400px;
| overflow: auto;
| }
|
| --
| Cheers,
| Trevor L.
| Website: http://tandcl.homemail.com.au
|
|
 
G

Guest

That's what I mean, only with images instead of words. The Iframes will
probably work though. Thanks to you both for your help, I'm going to try that
and see what I can do.
You guys are great!
 
R

Rob Giordano \(Crash\)

You may want to try Behaviors in FP as well. They're fun to mess with.



| That's what I mean, only with images instead of words. The Iframes will
| probably work though. Thanks to you both for your help, I'm going to try
that
| and see what I can do.
| You guys are great!
|
| "Rob Giordano (Crash)" wrote:
|
| > I wonder if acfrogg means collapsing paragraphs..sheesh I dunno what
they
| > are called...you know like in FAQs lists? Can't be Iframes since they
don't
| > "open"- since they're always opened.
| >
| >
| > | > | acfrogg wrote:
| > | > Thank you both, it's not quite what I mean. I want the box to open
| > | > within the same page. I know I'm not explaining it right, I'm trying
| > | > to find a site that has what I mean. Thanks for your help
| > |
| > | OK, I think I understand.
| > |
| > | An Iframe will open in the same window.
| > |
| > | See my site
| > | Open/Close News of this Site
| > |
| > | Does this do what you want?
| > |
| > | If so, the code is
| > | <button onclick="loadIframe('News','news.html')">Open/Close News of
this
| > | Site</button>
| > | <iframe class="c1" id="News" src=""></iframe>
| > |
| > | where loadIframe is a function which loads the file 'news.html' into
the
| > | Iframe 'News'. On the second click it hides the frame
| > | function loadIframe(id,sPath)
| > | {
| > | var x = document.getElementById(id)
| > | if (x.style.display != 'block')
| > | { x.src = sPath
| > | x.style.display = 'block'}
| > | else
| > | x.style.display = 'none'
| > | }
| > |
| > | c1 is a style for the Iframe
| > | .c1 {
| > | display: none;
| > | height: 200px;
| > | width: 400px;
| > | overflow: auto;
| > | }
| > |
| > | --
| > | Cheers,
| > | Trevor L.
| > | Website: http://tandcl.homemail.com.au
| > |
| > |
| >
| >
| >
 
T

Trevor L.

Rob said:
I wonder if acfrogg means collapsing paragraphs..sheesh I dunno what
they are called...you know like in FAQs lists? Can't be Iframes since
they don't "open"- since they're always opened.

I know acfrogg has replied, but as a matter of interest

Yes, iframes are always open, but on my site I added a button which calls JS
to change the style to 'none'. This effectively closes the Iframe.

function loadIframe(id,sPath)
{
var x = document.getElementById(id)
if (x.style.display != 'block')
{ x.src = sPath
x.style.display = 'block'}
else
x.style.display = 'none'
}

As for collapsing paras, I am sure this could also be done. Unless acfrogg
has further questions though, I'll leave this for now.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top