Frames Question...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How can i make it so that a frame stays invisible untill the user clicks on a
link? Like the user clicks a link that says Get Directions, than a frame pops
up right below it with a map...
 
You would have to use CSS Layers or a standard frameset with no frameset border set to zero and
blank page initially loaded when the frameset opens.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================
 
If you are asking a CSS Layers, you will have to wait for someone else to reply as I don't use
them. For framesets, create one and then play around with frameset property dialogs, to see what
happen when you try the different options, etc.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================
 
FrontPageUser said:
How can i make it so that a frame stays invisible untill the user
clicks on a link? Like the user clicks a link that says Get
Directions, than a frame pops up right below it with a map...

You could try an iframe
Using Code or HTML view, paste this code in the <head> section before
</head>
(Alter height and width as required)

<style type="text/css>
iframe.c1 {width: 50%; height: 50%; display: none; overflow: auto}
</style>
<script type="text/javascript">
function loadIframe(id,sPath)
{
var x = document.getElementById(id);
if (x.style.display != 'block')
{
if (sPath) x.src = sPath;
else return;
x.style.display = 'block';
}
else x.style.display = 'none';
}
</script>

Paste this code into the <body> section
<button onclick="loadIframe('Map','map.html')">Get/Hide Directions</button>
<iframe class="c1" id="Map" src=""></iframe>

Put whatever code you want into map.html, presumably the map and other text.

Clicking the button will open the iframe with map.html as contents. Clicking
the button again will close it.
 
Are you sure you want frames for this, as opposed to opeing the
directions in a new window? You can even put a "close this window"
link on the new window for when they are finished looking at the map.
 
Back
Top