Help - Search - Members - Calendar
Full Version: Descroption: 'location' is null or not an object
xFX JumpStart Public Forums > DHTML Menu Builder > Generic Problems > JavaScript Errors
DSOnsiteNJ
I'm trying to get the menu to work on a site I'm working on at http://www.midwood.com/index2.html. I've tried following the directions on using the remote configuration, and I've used the ftp function to load the site after doing the compile and loader codes, but still get the error:
Java Script Error
Descroption: 'location' is null or not an object
Source: http://www.midwood.com/side.html
Line: 787

Links are set to go to _main frame
xfx
It looks like the problem is related to the target frame.
Check that the target frame parameter for your links is set to a valid frame path.
xfx
Good thing you had the menus compiled in DEBUG mode.

I downloaded your menu.js file and found the problem.

Your target frame is set to _main but this is not a valid frame path. The correct target frame parameter should be:

top.main

-------

If you setup the "Frames Support" section of your configurations DMB will present a list of all the valid frame paths options on the target frame parameter so you don't have to write the frame paths yourself.
DSOnsiteNJ
That worked perfectly, thanks!
Next question:
If I click on the menu image button (that sets the mouseover event) it loads side.html into the top.main frame ...


Any ideas?
xfx
This is because your side.html document has the base target set to main.

CODE
<base target="main">


This means that ALL the links on the side.htm document must open on the main frame.

You will have to change your base target to point to the contents frame:

CODE
<base target="contents">


------

Another solution would be to change the href parameter of your hotspots like this:

CODE
href="javascript:void(0);"
DSOnsiteNJ
Tis a beautiful thing ...

Thanks Xavier
marpacwm
I also get this error but only on accessing one specific page using the DMB menu. The menu appears on all pages in my site and works fine except when attempting to use it to link to the specific problem page. I do not use frames on my site and all users access pages using IE5.5 or IE6. I am using DMB 3.5. If I access the problem page without using the menu, the page opens without error.

I'm on an intranet, but can send a file if that would help.
xfx
DMB 3.5 uses the "target frame" parameter even when the frames support is turned off.

Check the target frame for the command that links to that page and make sure is set to "_self".
marpacwm
I just checked and that page is set up exactly like the other pages in the menu. In the URL/Script line of DMB, the setting is to _self. I've attached an image showing the settings. Is there something else I could check, perhaps in the .js file?
marpacwm
I just checked and that page is set up exactly like the other pages in the menu. In the URL/Script line of DMB, the setting is to _self. I've attached an image showing the settings. Is there something else I could check, perhaps in the .js file?
xfx
What's the URL to your web site?
I would like to test your menus and debug them.

I just tried the URL that you posted earlier but I don't see any menus there (http://www.midwood.com/index2.html).
marpacwm
Sorry, but I think you have me confused with another poster. My web is on an intranet so can't be accessed publicly. Can I send you the appropriate files?
xfx
oops... you're right.

------

Ok... please post your .dmb project so I can test it.
marpacwm
OK, attached is the dmb file. Thanks.
xfx
I have run all the tests I can think of and nothing... I never got any errors.

Let's try one last thing:

Create a ZIP file and include in it one of the pages from your intranet (remove any private info from the page) and also include the .js files from DMB.

Then, I'll run them here to see if this way I can reproduce the problem.
Fogg
concerning this error
Descroption: 'location' is null or not an object

DMB 3.5 from 16 June has still this error and
DMB 3.5from 10 is fine, no error.
xfx
Fogg and marpacwm,

Please try to implement an online sample of your menu system so I can test it.

I have run numerous tests and upgraded several projects to the latest DMB 3.5 and I could never reproduce this problem.
marpacwm
Xavier has found a workaround for this issue. The error was strange in that it only occurred when linking to one specific page, even though the link was set up in the same way as all other menu links. Workaround is as follows:

Open your project in DMB.
Select a command that is known to work
Click on Edit->Copy
Check the option Event's Actions->Click->Target Frame
Click OK
Select the command that is generating the error:
Click on Edit->Paste
Click OK
Recompile the project (Tools->Compile)
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.