 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
danielfolsom
Joined: 26 Sep 2006 Posts: 34
|
Posted: Wed Feb 27, 2008 7:27 am Javascript and Div Menus |
|
|
|
Hey, so today I tried to make a rollover menu-type thing ... where essentially when someone rolled over the header, links would show up in a div under it. That worked, except I also wanted it to be that the text disappeared, and i did this using an onmouse out. Except then the problem was - you couldn't mouse over the links to click them, because they would disappear when the mouse left the header. So, I tried doing a div above the header that included the div I wanted to write to - although this doesn't work much better, any suggestions?
| Code: |
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<link rel="stylesheet" type="text/css" href="right.css" />
<base target="mainFrame">
<script>
function showplans(){
if (document.getElementById('plans').innerHTML.substr(0,1)!="<"){
document.getElementById('plans').innerHTML='<dd><a href="2007/Plans/1stQuarterPlan.html">1st Quarter</a></dd><dd><a href="2007/Plans/2ndQuarterPlan.html">2nd Quarter</a></dd><dd><a href="2007/Plans/3rdQuarterPlan.html">3rd Quarter</a></dd>'
}
else {
document.getElementById('plans').innerHTML=""
}
}
</script>
</head>
<body>
<dl>
<div style="border:1px solid black" onmouseover="showplans()" onmouseout="showplans()">
<dt><h3><span>Plans</span></h3></dt>
<div id="plans"></div>
</div>
</dl>
</body>
</html>
|
|
|
danielfolsom
Joined: 26 Sep 2006 Posts: 34
|
Posted: Wed Feb 27, 2008 7:34 am |
|
|
|
Sorry, solved my own problem - I just had to work it a different way.
| Code: |
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<link rel="stylesheet" type="text/css" href="right.css" />
<base target="mainFrame">
<script>
function showplans(){
if (document.getElementById('plans').style.display=="none"){
document.getElementById('plans').style.display = ""
}
else {
document.getElementById('plans').style.display = "none";
}
}
</script>
</head>
<body>
<dl>
<div style="border:1px solid black" onmouseover="showplans()" onmouseout="showplans()">
<dt><h3><span>Plans</span></h3></dt>
<div id="plans" style="display:none">
<dd><a href="2007/Plans/1stQuarterPlan.html">1st Quarter</a></dd><dd><a href="2007/Plans/2ndQuarterPlan.html">2nd Quarter</a></dd><dd><a href="2007/Plans/3rdQuarterPlan.html">3rd Quarter</a></dd>
</div></div>
</dl>
</body>
</html>
|
|
|
deep
Joined: 01 Mar 2008 Posts: 1
|
Posted: Sat Mar 01, 2008 9:47 pm |
|
|
|
| hi this is a very good site |
|
leahmarie
Joined: 04 Aug 2009 Posts: 60
|
Posted: Fri Sep 25, 2009 2:03 am |
|
|
|
| Good work!! Well done. I think you did a good job in fixing your site. |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|
|
 |
|
|
|
|
|
|
|