Click to See Complete Forum and Search --> : _gm is null or not an object


DanThMan
01-02-2004, 03:31 AM
I want the link fader script to work both in the menu and for the rest of
my site. When I call it just for the rest of my site the links in my menu
stops working. I'll get a "_gm" is null or not an object when I click on the links in the menu. I have no coding experience worth mentioning and it feels like I'm stuck right now I am using the milonic menu. I do think it's a conflict with mmenudom.js I have not yet tried to implement it in the menu. Is it even possible? The fader script is well known, but I'll send both the conflicting scripts along and hope that someone has the skills and the time to look it over!
However, the script makes a smooth, stunning effect that I really want to have. I've been at this for a couple of days now, trying everything I can think of! But it just won't work together with mmenudom.js.
I use frames, so I use the "body onload" which is known to cause conflicts with several scripts. I've tried the safeaddonload script and some other solutions, so now I'm pretty sure that this has nothing to do with this conflict
( OFF TOPIC: Is there any problems by using
<body onmouseover="if (self == top) top.location='index.html'">
instead of:
<body onload="if (self == top) top.location='index.html'">
Wouldn't that take care of the onload conflict. It seems to work for me. Just a thought)
My site is in swedish and I constantly change it for testing purposes, as I play
with different layouts to find new solutions ( someday maybe I'll even make it validate ) for other sites that I manage.
http://w1.474.telia.com/~u47403260/dannads/

If this post seems alittle bit odd it's because I've posted it in the milonic forum and copied and pasted it so it should make some sense in other forums. The milonic menu is fairly spread around the world and someone here would know what I'm trying to achieve. Help me please I'm grasping at straws! :)

Khalid Ali
01-02-2004, 07:57 AM
it sounds like you are calling same methods multiple time at onload...make sure that yor logic does not conflic when you try to achieve the required functionality.

DanThMan
01-02-2004, 09:58 AM
Thanx Khalid for taking your time!
I've uploaded both the scripts in scripts.zip. The one called mmenudom.js belongs to the menu and it's way out of my league. One thing I can think of is that the menu uses alot of mouseovers, and so does the fader.js. Maybe it's not just possible to make them interact with eachother? Still struggling for a solution!

Khalid Ali
01-02-2004, 10:01 AM
upload the relative html page so that I don't have to re-create it

DanThMan
01-02-2004, 11:41 AM
Thanx Kahlid!
I'm uploading the basic site with scripts and styles but without
the images. There is two different fader scripts I've tried with no luck! They have similar effect, and eitherone will do nicely
Much obliged
Dan
ps Any thoughts about my off topic question? ds

Khalid Ali
01-02-2004, 12:01 PM
now explain to me that what is the fading effect on this page,where do I bring my mouse or click and expect what to happen if the fade is working and ehat happens in case when fade is not working,plus when fade is not working you mentioned it breaks your other code what happens to the other code and what should it do if there is no fade code...

DanThMan
01-02-2004, 12:35 PM
Oh sorry!
This is before I tried the fader script. I thought you wanted it unmessed!
Put in..
<script language='javascript' src='script/fader.js' type='text/javascript'></script>
either in HEAD or the BODY section should work!
Now on the page there's these boxes made from css with links in them. There's no bgimages and the text is white so you have to move around a little. It also takes a few seconds before the whole frameset is loaded then when you move the cursor you will see the links fading. When this far, try to go up to the horisontal top menu. Slide out the submenu and then
pick a subsub menu ( all the links are in subsubmenus ) click
on a link and voila ....nothing happens except your script debugger that sure enough gonna show up.
much obliged
Dan

DanThMan
01-03-2004, 05:08 PM
If it might interest anyone I've got an answer in another forum!
"Far as I know, I dont think you can do it with the menu as it is in its current implementation. Right now when you add an onFunction to a menu item I believe it places it in the onMouseOver event of the TD cell which comprises the menu item, NOT the <a> tag in it. Your fader script looks like it depends on the findLink method being placed in the onMouseOver event of the <a>, and not the <td>. So I doubt you could get it to work INSIDE of the menu.

Now you say it causes problems on the rest of the site. This is becase this script seems to automatically reassign all the IDs of ALL links in a webpage. And then tries to assign mouseover and mouseout events to them...this probably screws with the menu's links because I know the menu specifically assigns its own unique IDs to <A> tags.. Looking at the docs the only thing I can think of is see if we can get Andy to assign a dummy class name to all the links and then you could set the ignoreClass variable in the script to that so it ignores the links in the menu.

But personally, you're loading up your page with alittle too much javascript (and java applets). I am on a T1 connection and the page was painfully slow to load. But thats just my humble opinion.
_________________
Dave Hergert
Web Application Developer "

This tells me that I can forget about the fader script, because what I wanted is not possible.
Now I can go on with my life....
Thanx to you all who did spend time on this
:)