J
Jim Carlock
I've toyed with using css to get hover effects, but Internet
Explorer continuously fails to work properly...
/*
:hover on anything other than <a> tags does not
work with any version of IE.
td.menuButton:hover {
text-align: center;
font-family: verdana, helvetica, san-serif;
font-size: 10pt;
width: 100px;
color: #990033;
background-color: transparent;
text-decoration: none;
}
*/
So I get around it by using javascript. And if I'm going to use
JavaScript, I might as well create a menuButton object. How
<script language="javascript"><!--
function buttFrame(n,x) {
if (document.getElementById) {
var button=document.getElementById("butt300"+n);
button.style.backgroundPosition=x+"px 0px";
button=document.getElementById("top");
}
}
--></script>
<tr>
<td class="menuButton"><div class="menuButton"
id="butt3001"><a href="#" class="menuButton"
onmouseover="buttFrame(1,200);"
onmouseout="buttFrame(1,0);"
onmousedown="buttFrame(1,100);"
onmouseup="buttFrame(1,200);">Get Info</a></div></td>
</tr>
Anyone have a suggestion on how to deploy this as an object
so as I need not use all that onmouse... stuff? I see alot of
stuff about javascript's built-in objects... and I thought I read
something in the past where there's a way to create your own
objects.
Maybe a global onmouse... function which checks the id?
Thanks.
Explorer continuously fails to work properly...
/*
:hover on anything other than <a> tags does not
work with any version of IE.
td.menuButton:hover {
text-align: center;
font-family: verdana, helvetica, san-serif;
font-size: 10pt;
width: 100px;
color: #990033;
background-color: transparent;
text-decoration: none;
}
*/
So I get around it by using javascript. And if I'm going to use
JavaScript, I might as well create a menuButton object. How
<script language="javascript"><!--
function buttFrame(n,x) {
if (document.getElementById) {
var button=document.getElementById("butt300"+n);
button.style.backgroundPosition=x+"px 0px";
button=document.getElementById("top");
}
}
--></script>
<tr>
<td class="menuButton"><div class="menuButton"
id="butt3001"><a href="#" class="menuButton"
onmouseover="buttFrame(1,200);"
onmouseout="buttFrame(1,0);"
onmousedown="buttFrame(1,100);"
onmouseup="buttFrame(1,200);">Get Info</a></div></td>
</tr>
Anyone have a suggestion on how to deploy this as an object
so as I need not use all that onmouse... stuff? I see alot of
stuff about javascript's built-in objects... and I thought I read
something in the past where there's a way to create your own
objects.
Maybe a global onmouse... function which checks the id?
Thanks.