Help - Search - Members - Calendar
Full Version: Javascrip problems coincidental to recent DMB, IE, and FF upgrades
xFX JumpStart Public Forums > DHTML Menu Builder > Generic Problems > JavaScript Errors
George
Problem solved with all your help.
The problem lay outside of DMB in the layerSwap routine (not indexed properly). The various and somewhat misleading errors being reported by IE led me on a wild goose chase. The error caught by xfx proved to be the key to correcting the situation. I'd like to know what software was being used to accurately detect the error.

Thanks much to all. biggrin.gif

George


I would appreciate any help toward resolving a problem with my latest menu project.

There have been very few problems in the past, all due to my inexperience, but none unresolved on old sites developed with older editions of DMB, IE, and FF.

The problem on a new site is coincidental with upgrading to v4.15(de) and latest upgrades to IE and FF. Direct links work in both IE and FF, but known to be good commands calling javascript code do not.

In FF, there is no response to commands calling javascript code.

In IE:
1) Upon loading "http://abgsa.org/dmb.htm" (clone of home page with all but the menu and swapping code removed), the following error is triggered:

"Java Script Error
Description: Object expected
Source: http://abgsa.org/dmb.htm
Line: 11
[OK]"

Clicking "OK" clears the message.

2) Upon selecting any command link that executes javascript code "java script:sh0_swapLayers('layUC');" (w/o quotes), the following error is triggered:

"Java Script Error
Description: Object expected
Source: http://abgsa.org/dmb.htm
Line: 1232
[OK]"

There are only 192 lines of code in the file, including the non-optimized DMB code.

The "sh0_swapLayers('xxx')" code is currently very nicely working with DMB on several other sites I developed, including: http://dydrentals.com; http://garynaacp.org/home.asp; http://innaacp.org/home.asp (Home and Structure, thus far); http://www.bloomingtonbbpa.org/home.asp; and http://cjamcenter.org/home.asp.

Relevant files are attached: nmbcc.dmb, hRef.txt, nmbcc.txt (js)

Thank you in advance for any help provided.
Click to view attachmentClick to view attachmentClick to view attachment
Hywel
I get a different JavaScript error in Firefox 1.5:
Error: MM_callJS is not defined
Source File: http://abgsa.org/dmb.htm
Line: 1

I'd strip out all of the Macromedia stuff, or install the DMB script into a reasonably empty document.

In fact, remove this from the <body> tag:

onload="MM_callJS('sh0_swapLayers(\'layHome\')')

That funcion (MM_callJS) isn't defined anywhere in your document or in the included script files.
xfx
Dear George,

I'm receiving this error:

Error: FlashSound is not defined
Source file: http://abgsa.org/nm_includes/DWMX_Javascripts.js
Line: 43

The error is generated by this line of code:
var mysound = new FlashSound( );

This also looks like code from Macromedia and not the menus.
George
Thank you for your comments. Indeed, I had already stripped out the Dreamweaver javascript code.

The "onload="MM_callJS('sh0_swapLayers(\'layHome\')')" was responsible for the first error, so that has been removed also.

That leaves me with an error on line "1232" (which doesn't exist).

The only remaining javascript belongs to DMB and the swapLayer code.

I replaced the swpLayer code with that of a currently working site, the same resulting error.

Is there a way to uninstall the DMB upgrade? I'm wary of further developing even the older sites for fear they will then break.

QUOTE (xfx @ May 22 2006, 01:50 PM) *
Dear George,

I'm receiving this error:

Error: FlashSound is not defined
Source file: http://abgsa.org/nm_includes/DWMX_javascripts.js
Line: 43

The error is generated by this line of code:
var mysound = new FlashSound( );

This also looks like code from Macromedia and not the menus.
xfx
I still think that the error is in no way related to the menus... note that the menus work just fine regardless of the javascript errors. If the menus were the cause of the errors then they would not show up or would produce further errors when being used.

For the moment, try removing the "var mysound = new FlashSound( );" line from the DWMX_javascripts.js file and see if this resolves the problem.
George
QUOTE (George @ May 22 2006, 01:55 PM) *
Thank you for your comments. Indeed, I had already stripped out the Dreamweaver javascript code.

The "onload="MM_callJS('sh0_swapLayers(\'layHome\')')" was responsible for the first error, so that has been removed also.

That leaves me with an error on line "1232" (which doesn't exist).

The only remaining javascript belongs to DMB and the swapLayer code.

I replaced the swpLayer code with that of a currently working site, the same resulting error.

Is there a way to uninstall the DMB upgrade? I'm wary of further developing even the older sites for fear they will then break.



Flashsound was part of a group of generic javascript calls generated by Dreamweaver over time and included in all my sites. I temporarily stuck it back in the stripped down file to see if it was affecting the "onload script". Without it, that script failed and caused the first error. The second, and more significant error, remains.

George
xfx
I just noticed another error when clicking the menus... the error reports that "sh0_swapLayers" is not defined.

Are you perhaps using an AddIn with your menus that performs some additional action when the menu items are clicked?
George
QUOTE (xfx @ May 22 2006, 02:03 PM) *
I just noticed another error when clicking the menus... the error reports that "sh0_swapLayers" is not defined.

Are you perhaps using an AddIn with your menus that performs some additional action when the menu items are clicked?



Hmmmm! I'm not getting that error. "sh0_swapLayers" . . .THAT'S IT!

The swapLayers script was not indexed properly. Having corrected that, the menu works as it should.

Thank you ever so much.

George
xfx
Great!
Glad I could help...
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.