Forum Moderators: open
Obviously the fallback solution to this problem is simple, but I would prefer not to add any onmouseover attributes to the markup.
I've tried to make it work as shown below (reduced test case), but it won't work. Suggestions much appreciated.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Mouseover Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javaScript">
function stat_write(yourtext) {
window.status=yourtext;
}
function windowStatus() {
window.status = "test!";
}
function statusBar() {
document.getElementById('testId').onmouseover = windowStatus;
}
window.onload = statusBar;
</script>
</head>
<body>
<a href="http://someplace.com" id="testId">Test Link</a>
</body>
</html>
I've used this method for image rollovers, changing link properties etc very successfully. I have no idea why this doesn't work.
-b