Doing the Same Thing … Only in Netscape Navigator 4!

If you want to do the same thing in Netscape Navigator 4, you can pick up the trail at the point where you were about to add the statements to the JavaScript function in the Internet Explorer example:

<html>
<head>
<title>A Simple Page</title>
<script language="JavaScript">
<!-- Cloaking device on!
function moveTxt()
{
}
// Cloaking device off -->
</script>
</head>
<body>
<div id="ani1" style="position:absolute;left:10;top:10">
Text ... on the go!
</div>
</body>
</html>

As in the previous example, you need to add an if statement. However, this time, the syntax for the expression used is slightly different. This time, you need the following:

 <html> <head> <title>A Simple Page</title> <script ...

Get JavaScript™ 1.5 by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.