Gossamer Forum
Home : General : Internet Technologies :

JavaScript Issue

Quote Reply
JavaScript Issue
Code:


<script language="JavaScript">
<!-- Begin
function highlite() {
var theitem;
theitem = window.event.srcElement;
theitem.style.background = "#0E72A4";
theitem.style.color = "#FFFFFF";
theitem.style.fontWeight = "bold";
}
function unhighlite() {
var theitem;
theitem = window.event.srcElement;
theitem.style.background = "#C8D1D7";
theitem.style.color = "#006699";
theitem.style.fontWeight = "bold";
}
function jumpto(theurl) {
window.location.href = theurl;
}
// End -->
</script>

<td class="submenu" onMouseOver="highlite(); window.status='Home'; return true;"

onMouseOut="unhighlite(); window.status=''; return true;" onClick="jumpto('/')">Home</td>


Works with MSIE (menu selection <td>..</td> cell is highlighted when mouseOver, and unhighlighted when mouse not over). But using Netscape, no effect - and, mouse cursor appears not as hand, but as a "normal select" arrow when mouseOver. However, onClick still works with both browsers.

Any ideas as to how to revise so fully compatible with Netscape? But not using MouseOver image solution. Entire <td>..</td> cell must be hightlighted so all menu selections appear 'equal' length.

----
Cheers,

Dan
Founder and CEO

LionsGate Creative
GoodPassRobot
Magelln
Quote Reply
Re: [dan] JavaScript Issue In reply to
I'd use plain css with a tad of JS.

Code:

<style type="text/css">
TD.over {
cursor: pointer;
font-weight: 600;
color: #FFFFFF;
background-color: #0E72A4;
}

TD.out {
background-color: #C8D1D7;
color: #006699;
font-weight: 600;
}
</style>

Then use:

<td onmouseover="this.className='over'; windows.status='Home';" onmouseout="this.className='out'; window.status='';" class="out" onclick="location.href='/';">Home</td>
Quote Reply
Re: [Paul] JavaScript Issue In reply to
Actually I came with another solution (shortly after my posting), but thanks!

----
Cheers,

Dan
Founder and CEO

LionsGate Creative
GoodPassRobot
Magelln