L
Lee David
I have a page that has menu buttons on it. There are regular, over and down
images that I swap. The problem is I can't seem to get the buttons to
stick. So if I click the "News" image, that page comes up, but the button
returns to the "normal" image when I want it to keep the "down" image until
a different button is clicked. Here is some of the code:
function mousedown(source, img, area)
{
document[source].src = img;
document[area].src = "../images/menu/" + area + "menu_f3.gif";
}
"Source" is the secondary menu buttons on specific pages. "Area" is the
major menu buttons on all pages. This would be called on a page by this:
<script language="JavaScript" type="text/javascript">
mouseover('News', '../images/menu/Newsmenu_f2.gif', 'dummy');
</script>
<table width="100%" border="0" cellspacing="10" align="center">
<tr>
<td width="15%" valign="top">
<table width="100" border="0">
<tr>
<td>
<br>
<a href="news.php?contact=general">
<img src="../images/news/General.gif" name="newsgen"
onmouseover="mouseover('newsgen', '../images/news/General_f2.gif',
'News')"
onmousedown="mousedown('newsgen', '../images/news/General_f3.gif',
'News')"
onmouseout="mouseout('newsgen', '../images/news/General.gif',
'News')"
alt="General Info Button" title="General Info Button"
border="0"></a></td>
</tr>
The first javascript is to force the major button to "down" whenever the
page is loaded. What I see is while the submenu button is down, the major
one is down. When you leave the submenu button, the major one pops back to
the "normal" state. The major menu is located in an include that is
included on all pages.
Any ideas of what I'm doing wrong?
TIA, Dave
images that I swap. The problem is I can't seem to get the buttons to
stick. So if I click the "News" image, that page comes up, but the button
returns to the "normal" image when I want it to keep the "down" image until
a different button is clicked. Here is some of the code:
function mousedown(source, img, area)
{
document[source].src = img;
document[area].src = "../images/menu/" + area + "menu_f3.gif";
}
"Source" is the secondary menu buttons on specific pages. "Area" is the
major menu buttons on all pages. This would be called on a page by this:
<script language="JavaScript" type="text/javascript">
mouseover('News', '../images/menu/Newsmenu_f2.gif', 'dummy');
</script>
<table width="100%" border="0" cellspacing="10" align="center">
<tr>
<td width="15%" valign="top">
<table width="100" border="0">
<tr>
<td>
<br>
<a href="news.php?contact=general">
<img src="../images/news/General.gif" name="newsgen"
onmouseover="mouseover('newsgen', '../images/news/General_f2.gif',
'News')"
onmousedown="mousedown('newsgen', '../images/news/General_f3.gif',
'News')"
onmouseout="mouseout('newsgen', '../images/news/General.gif',
'News')"
alt="General Info Button" title="General Info Button"
border="0"></a></td>
</tr>
The first javascript is to force the major button to "down" whenever the
page is loaded. What I see is while the submenu button is down, the major
one is down. When you leave the submenu button, the major one pops back to
the "normal" state. The major menu is located in an include that is
included on all pages.
Any ideas of what I'm doing wrong?
TIA, Dave