'easy' CSS/JavaScript effect but not working!

  Limariami 22:05 09 Mar 05

Hi all

Please help.

I cannot see what I am doing wrong. I am trying to create a straightforward effect using JavaScript and CSS, whereby a menu option changes colour when the mouse hovers, then loads a new page when clicked.

BUT it does not work at all. It seems that the browser (opera 7.51) is not seeing the function. This is the message I get in teh browser JavaScript console.

Event thread: onmouseover
name: ReferenceError
message: Statement on line 1: Reference to undefined variable: No such variable 'focusTitle'
In unknown script
At unknown location
{event handler trampoline}

The relevant bits of my code are

function focusTitle(j)
var currEl = document.getElementById('Title' + j);
currEl.className = "nav2" ;


td height="100" width="150">
div id="Title1" class="nav1" onMouseOver="focusTitle(1)" onmouseout="defocusTitle(1)" onclick="loadPage(1)">111 /div>
div id="Title2" class="nav1" onMouseOver="focusTitle(2)" onmouseout="defocusTitle(2)" onclick="loadPage(2)">222 /div>

Any ideas appreciated. Thanks.

  Limariami 22:08 09 Mar 05

PS for some strange reason, I cannot see the less-than signs in the message I have just posted

This thread is now locked and can not be replied to.

Nintendo Switch review: Hands-on with the intuitive modular console and its disappointing games…

1995-2015: How technology has changed the world in 20 years

The updated 'Corel Painter inside Photoshop' plugin ParticleShop offers new brushes

New MacBook Pro 2017 release date, UK price and tech specs: Kaby Lake MacBook Pro to launch in…