[SIZE=”2″]Hey all,
It’s so nice to see so many folks helping eachother with changing web languages. Fairly new to all forms of web languages but am dabbling in HTML, CSS, Javascript and Flash. Got a javascript function (showDiv) that shows a labeled div onmouseover that are text intrapage links. Also have a (hideDiv) that hides it onmouseout. Those both work, I cannot for the life of me get the onmouseout or hideDiv to stay once moused out. I was searching and it seems the best method is the “setTimeOut” method, but just have no clue! Can anyone help?
What I have:
[B]JAVASCRIPT:
<script language=”Javascript”>
<!–
function showDiv(id) {
if (document.layers) document.layers[”+id+”].visibility = “show”
else if (document.all) document.all[”+id+”].style.visibility = “visible”
else if (document.getElementById) document.getElementById(”+id+”).style.visibility = “visible”
setTimeout(“hideDiv(id)”, 10000);
}
function hideDiv(id) {
if (document.layers) document.layers[”+id+”].visibility = “hide”
else if (document.all) document.all[”+id+”].style.visibility = “hidden”
else if (document.getElementById) document.getElementById(”+id+”).style.visibility = “hidden”
}
//–>
</script>
[B]CSS:
<style type=”text/css”>
body{
font-family: Arial, Helvetica, Sans-Serif;
background-color: #FDFFBC;}
a.intralink{
color: #656500;
font-size: 9pt;
font-weight: bold;
text-decoration: none;}
a.intralink:hover{
color: #FFFFFF;
background-color: #656500;
font-size: 9pt;
text-decoration: none;}
a.reglink{
color: #656500;
font-size: 10pt;
font-weight: bold;
text-decoration: none;}
a.reglink:hover{
color: #656500;
font-size: 10pt;
text-decoration: underline;}
div{
display: block;}
#div1, #div2, #div3, #div4{
visibility:hidden}
</style>
[B]Image Link to show other div and hide with delay:
<td width=”232″ valign=”middle”>
<div align=”center”>
<a href=”about.html”
onmouseover=”document.About.src=’Btn_About_over.gif’; showDiv(‘div1’);”
onmouseout=”document.About.src=’Btn_About_up.gif’; showDiv(‘div1’);”>
<img src=”Btn_About_up.gif”
name=”About”
alt=”About Us” border=”0″ width=”225″ />
</a>
</div>
</td>
Any help is greatly appreciated, Thanks![/SIZE][/SIZE][/SIZE]