Wrox Programmer Forums
|
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 8th, 2006, 05:22 PM
Registered User
 
Join Date: Apr 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Drop Down Menus in Tables

Hi,

I've been reading through the book 'Beginning Javascript' and I was hoping to re-create the drop-down menu system as shown in Chapter 13.

Because of the way that I have designed my website, I am placing the images, under which the drop-down menus appear, inside a row of a table.

At the moment, I have done this by encasing the images inside a <div> tag inside a <td>, thus:

Code:
<table>
<tr>
<td>
<div onmouseover="document_onmouseover(event)" onmouseout="document_onmouseout(event)">

<script language="javascript">
document.write(createMenu('Home', homeMenuItems))
</script>

<a href="index.html">
<IMG id="HomeMenuImage" SRC="Pics/Banners/home.jpg" border="0"
style="position:absolute;left:55px;top:113px;"
onmouseover="return showMenu(document.getElementById('HomeMenuDiv'), event)"
onmouseout="return hideMenu(document.getElementById('HomeMenuDiv'),4,event)">
</a>

</div>
</td>
</tr>
</table>
This method of doing it works in IE6.0 and Netscape Browser 8.1 (running in IE mode), however in Firefox based browsers (including Netscape 7.1) the menus do not appear at all.

Does anyone know how I can edit my code in order for it to work? The rest of the JavaScript code is unchanged from the example in the book.

Thanks :),

Dan






Similar Threads
Thread Thread Starter Forum Replies Last Post
adding values from drop down menus racey Classic ASP Basics 1 August 22nd, 2006 05:26 AM
Displaying drop down menus on the top of Combo box karunkumar_g Javascript 3 December 14th, 2005 01:46 PM
JS validation on the drop-down menus crmpicco Javascript How-To 0 July 1st, 2005 05:30 AM
change the value of two drop-down menus crmpicco Classic ASP Basics 3 March 28th, 2005 08:10 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.