'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.

What is Amazon Go and will it come to the UK? The store without checkouts or queues

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

Hands-on with the Star Wars fighting drones you can fly yourself

15 macOS Sierra tips | How to use macOS Sierra: Secret tricks and best new features in Apple's new…