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.