Object Not Found Error for Drop Down Menu

D

Dave

I pulled this code from a How to site for build drop down
menus. When I execute I get object not found on this line

onmouseout="collapse(this);">

It doesn't like collapse(this); I hope it's not as stupid
as I need to replace this with something. It works in
Homesite though.

Thanks in Advance
Dave


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
<LINK REL="StyleSheet" HREF="menu.css">
<script language="javascript" src="menu.js"></script>
</head>

<body>

<h1 align="center">Main Heading</h1>

<table class="navbar" width="800">
<tr>
<td class="menuNormal" width="160"
onmouseover="expand(this);" onmouseout="collapse(this);">
<p>Menu 1</p>
<div class="menuNormal" width="155">
<table class="menu" width="155">
<tr><td class="menuNormal"><a HREF="page.asp"
class="menuitem">Item 1</a></td></tr>
<tr><td class="menuNormal"><a HREF="page.asp"
class="menuitem">Item 2</a></td></tr>
<tr><td class="menuNormal"><a HREF="page.asp"
class="menuitem">Item 3</a></td></tr>
<tr><td class="menuNormal"><a HREF="page.asp"
class="menuitem">Item 4</a></td></tr>
</table>
</div>
</td>

<td class="menuNormal" width="160"
onmouseover="expand(this);" onmouseout="collapse(this);">
<p>Menu 2</p>
<div class="menuNormal" width="155">
<table class="menu" width="155">
<tr><td class="menuNormal"><a HREF="page.asp"
class="menuitem">Item 1</a></td></tr>
<tr><td class="menuNormal"><a HREF="page.asp"
class="menuitem">Item 2</a></td></tr>
<tr><td class="menuNormal"><a HREF="page.asp"
class="menuitem">Item 3</a></td></tr>
<tr><td class="menuNormal"><a HREF="page.asp"
class="menuitem">Item 4</a></td></tr>
</table>
</div>
</td>

<td class="menuNormal" width="160"
onmouseover="expand(this);" onmouseout="collapse(this);">
<p>Menu 3</p>
<div class="menuNormal" width="155">
<table class="menu" width="155">
<tr><td class="menuNormal"><a HREF="page.asp"
class="menuitem">Item 1</a></td></tr>
<tr><td class="menuNormal"><a HREF="page.asp"
class="menuitem">Item 2</a></td></tr>
<tr><td class="menuNormal"><a HREF="page.asp"
class="menuitem">Item 3</a></td></tr>
<tr><td class="menuNormal"><a HREF="page.asp"
class="menuitem">Item 4</a></td></tr>
</table>
</div>
</td>

<td class="menuNormal" width="160"
onmouseover="expand(this);" onmouseout="collapse(this);">
<p>Menu 4</p>
<div class="menuNormal" width="155">
<table class="menu" width="155">
<tr><td class="menuNormal"><a HREF="page.asp"
class="menuitem">Item 1</a></td></tr>
<tr><td class="menuNormal"><a HREF="page.asp"
class="menuitem">Item 2</a></td></tr>
<tr><td class="menuNormal"><a HREF="page.asp"
class="menuitem">Item 3</a></td></tr>
<tr><td class="menuNormal"><a HREF="page.asp"
class="menuitem">Item 4</a></td></tr>
</table>
</div>
</td>

<td class="menuNormal" width="160"
onmouseover="expand(this);" onmouseout="collapse(this);">
<p>Menu 5</p>
<div class="menuNormal" width="155">
<table class="menu" width="155">
<tr><td class="menuNormal"><a HREF="page.asp"
class="menuitem">Item 1</a></td></tr>
<tr><td class="menuNormal"><a HREF="page.asp"
class="menuitem">Item 2</a></td></tr>
<tr><td class="menuNormal"><a HREF="page.asp"
class="menuitem">Item 3</a></td></tr>
<tr><td class="menuNormal"><a HREF="page.asp"
class="menuitem">Item 4</a></td></tr>
</table>
</div>
</td>
</tr>
</table>

</body>
</html>
 
S

Stefan B Rusynko

Go back to the site you got it from and make sure you get the JavaScript file menu.js (which should define those functions), and
have imported it into the same folder (in FP) that you are running your script from with the tag
<script language="javascript" src="menu.js"></script>
If it is not in the same folder change your path to point to it



| I pulled this code from a How to site for build drop down
| menus. When I execute I get object not found on this line
|
| onmouseout="collapse(this);">
|
| It doesn't like collapse(this); I hope it's not as stupid
| as I need to replace this with something. It works in
| Homesite though.
|
| Thanks in Advance
| Dave
|
|
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
| Transitional//EN"
| "http://www.w3.org/TR/html4/loose.dtd">
| <html>
|
| <head>
| <LINK REL="StyleSheet" HREF="menu.css">
| <script language="javascript" src="menu.js"></script>
| </head>
|
| <body>
|
| <h1 align="center">Main Heading</h1>
|
| <table class="navbar" width="800">
| <tr>
| <td class="menuNormal" width="160"
| onmouseover="expand(this);" onmouseout="collapse(this);">
| <p>Menu 1</p>
| <div class="menuNormal" width="155">
| <table class="menu" width="155">
| <tr><td class="menuNormal"><a HREF="page.asp"
| class="menuitem">Item 1</a></td></tr>
| <tr><td class="menuNormal"><a HREF="page.asp"
| class="menuitem">Item 2</a></td></tr>
| <tr><td class="menuNormal"><a HREF="page.asp"
| class="menuitem">Item 3</a></td></tr>
| <tr><td class="menuNormal"><a HREF="page.asp"
| class="menuitem">Item 4</a></td></tr>
| </table>
| </div>
| </td>
|
| <td class="menuNormal" width="160"
| onmouseover="expand(this);" onmouseout="collapse(this);">
| <p>Menu 2</p>
| <div class="menuNormal" width="155">
| <table class="menu" width="155">
| <tr><td class="menuNormal"><a HREF="page.asp"
| class="menuitem">Item 1</a></td></tr>
| <tr><td class="menuNormal"><a HREF="page.asp"
| class="menuitem">Item 2</a></td></tr>
| <tr><td class="menuNormal"><a HREF="page.asp"
| class="menuitem">Item 3</a></td></tr>
| <tr><td class="menuNormal"><a HREF="page.asp"
| class="menuitem">Item 4</a></td></tr>
| </table>
| </div>
| </td>
|
| <td class="menuNormal" width="160"
| onmouseover="expand(this);" onmouseout="collapse(this);">
| <p>Menu 3</p>
| <div class="menuNormal" width="155">
| <table class="menu" width="155">
| <tr><td class="menuNormal"><a HREF="page.asp"
| class="menuitem">Item 1</a></td></tr>
| <tr><td class="menuNormal"><a HREF="page.asp"
| class="menuitem">Item 2</a></td></tr>
| <tr><td class="menuNormal"><a HREF="page.asp"
| class="menuitem">Item 3</a></td></tr>
| <tr><td class="menuNormal"><a HREF="page.asp"
| class="menuitem">Item 4</a></td></tr>
| </table>
| </div>
| </td>
|
| <td class="menuNormal" width="160"
| onmouseover="expand(this);" onmouseout="collapse(this);">
| <p>Menu 4</p>
| <div class="menuNormal" width="155">
| <table class="menu" width="155">
| <tr><td class="menuNormal"><a HREF="page.asp"
| class="menuitem">Item 1</a></td></tr>
| <tr><td class="menuNormal"><a HREF="page.asp"
| class="menuitem">Item 2</a></td></tr>
| <tr><td class="menuNormal"><a HREF="page.asp"
| class="menuitem">Item 3</a></td></tr>
| <tr><td class="menuNormal"><a HREF="page.asp"
| class="menuitem">Item 4</a></td></tr>
| </table>
| </div>
| </td>
|
| <td class="menuNormal" width="160"
| onmouseover="expand(this);" onmouseout="collapse(this);">
| <p>Menu 5</p>
| <div class="menuNormal" width="155">
| <table class="menu" width="155">
| <tr><td class="menuNormal"><a HREF="page.asp"
| class="menuitem">Item 1</a></td></tr>
| <tr><td class="menuNormal"><a HREF="page.asp"
| class="menuitem">Item 2</a></td></tr>
| <tr><td class="menuNormal"><a HREF="page.asp"
| class="menuitem">Item 3</a></td></tr>
| <tr><td class="menuNormal"><a HREF="page.asp"
| class="menuitem">Item 4</a></td></tr>
| </table>
| </div>
| </td>
| </tr>
| </table>
|
| </body>
| </html>
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top