Wrox Programmer Forums
|
BOOK: Beginning Dreamweaver MX/MX 2004 MX ISBN: 978-0-7645-4404-0; MX 2004 ISBN: 978-0-7645-5524-4
This is the forum to discuss the Wrox book Beginning Dreamweaver MX by Charles E. Brown, Imar Spaanjaars, Todd Marks; ISBN: 9780764544040
Please indicate which version of the book you are using when posting questions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Dreamweaver MX/MX 2004 MX ISBN: 978-0-7645-4404-0; MX 2004 ISBN: 978-0-7645-5524-4 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 October 26th, 2004, 01:28 PM
Registered User
 
Join Date: Oct 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Javascript Errors in DWMX2004 Pop-Up Menu

Recently we began a project where the decision to add pop-up menus was made after the Fireworks stage of the template creation, so we designed our pop-ups from within Dreamweaver MX 2004 itself. To clear some of the specifics and eliminate some of the preliminary questions, we know that Dreamweaver does not dynamically update links from within popup menus so we designed them with absolute URL's for the images and for the links. Once created, the menu previewed fine on my machine (the creator) and the synchronized site works fine on my machine also, however, it will not work correctly on any other machine we try it on. The rollover effects work fine, but the popup menus do not appear on the other machine and Javascript errors are produced.
The site can be found at:
http://www.tworiverspublichealth.com

The following are the errors we are seeing:
Line: 18
Char: 27
Error: 'Menu' is undefined

and on every menu item we get:
Line: 159 (different line numbers for different errors)
Char: 220 (also different for different errors)
Error: Object Expected

A quick background on how the menus were designed. Initially, I created all of the rollover effects for the image changes first. I then used the Pop-Up menu creator incorporated with Dreamweaver to create each popup menu. Each image also has a unique id="" and name="" identifier, so there are no conflicts.

Here is the code generating the first error:
<!--
function mmLoadMenus() {
if (window.mm_menu_1022144510_0) return;
window.mm_menu_1022144510_0 = new Menu("root",137,18,"Verdana, Arial, Helvetica, sans-serif",10,"#666666","#FFFFFF","#E6E6E6","#0842A5", "left","middle",4,0,1000,-5,7,true,true,true,0,true,true);
mm_menu_1022144510_0.addMenuItem("Board of Health","location='http://www.tworiverspublichealth.com/About/Board.htm'");
mm_menu_1022144510_0.addMenuItem("Staff","location ='http://www.tworiverspublichealth.com/About/Staff.htm'");

The Errors for subsequent menu items are generated in the following lines:
<tr>
<td height="30" bgcolor="#E7E7E7"><img src="http://www.tworiverspublichealth.com/images/template/menu/MenuTemplate_r4_c1.gif" name="programs" width="153" height="30" border="0" id="programs"></td>
<td><img src="http://www.tworiverspublichealth.com/images/template/menu/MenuTemplate_r3_c2.gif" name="programsarrow" width="28" height="30" id="programsarrow"></td>
</tr>

Any help would be greaty appreciated.
Thanks,

Dustin Horne
Web Designer I
IntelliCom Computer Consulting, Inc.
[email protected]


Dustin Horne
Web Designer I
IntelliCom Computer Consulting, Inc.
http://www.intellicominc.com
[email protected]
 
Old October 26th, 2004, 03:11 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

When you create a DW menu, DW also creates a Javascript source file for you.
Did you upload that file to your remote server?

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: RefuseResist by Sepultura (Track 1 from the album: Chaos A.D.) What's This?
 
Old October 28th, 2004, 08:36 AM
Registered User
 
Join Date: Oct 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes, it was uploaded. Thank you for your reply! But I did just figure out the problem...it took a little code sifting, but when changing the links all to the absolute url's I missed one line....the line that was the call to the mm_menu.js file. I have the website folder on our server mapped to my Y: drive, and no one else does, which is why the page worked fine on my PC but not others. It's almost scary that I could browse to the page (http://www.tworiverspublichealth.com) and it actually read the mm_menu.js file from my local drive without a problem, but it's fixed now. Thanks again!

Dustin Horne
Web Designer I
IntelliCom Computer Consulting, Inc.
http://www.intellicominc.com
[email protected]
 
Old November 30th, 2004, 07:00 PM
Registered User
 
Join Date: Nov 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I was having the same problem and came across this post. So, I put in the absolute link to the mm_menu.js file. The error is gone, but now my pop-up menus aren't showing up. Any ideas on why that is and how I can fix it?

thanks!
 
Old November 30th, 2004, 07:28 PM
Registered User
 
Join Date: Oct 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Could you post a bit of the source code from your file including the absolute file references? You could also drop me an e-mail [email protected]

Thanks,

Dustin Horne
Web Designer I
IntelliCom Computer Consulting, Inc.
http://www.intellicominc.com
[email protected]





Similar Threads
Thread Thread Starter Forum Replies Last Post
Pop Up Menu and Frames ihahockey Dreamweaver (all versions) 3 June 14th, 2004 06:32 AM
Pop up menu for image joshil Dreamweaver (all versions) 0 May 14th, 2004 12:58 PM
Pop up menu with frames pmcquirk Javascript How-To 2 May 7th, 2004 09:29 AM





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