NS Problem - ...

John Pollock's picture

He has: 628 posts

Joined: Mar 1999

Hmmm...Do you have this posted at a live url? I couldn't see a problem through just the code, but looking at the page live might help me see where things are going wrong... Smiling

----------
Page Resource: http://www.pageresource.com
JavaScript City: http://www.javascriptcity.com

They have: 5,633 posts

Joined: Jan 1970

I'm sorry I dont have a live demo yet. I'll put one online on monday. The script is just a simple mouseover thing. I finished it today, but there are no changes just some more code. The page is a map of Germany with the areas of the first numbers of the zip codes highlighted onMouseOver.

I have used the same script source for mouseover a million times, so I'm sure there is no mistake in the function thats doing the image chage itself. It must be a conflict within the declaration of the image objects. The error message suggests that te problem is specifically limited to the images that are exchange for the originals.
I had to do this page again after I noticed I cutted some of the images wrong. The weird thing id that the script worked before I made the new images, and I just cant find a difference between the new and the old one, except different names for objects.

Could it be, NS+JS, has a problem with object names that include three consecutive numbers?

Maybe this helps, otherwise I'll post the the live page on Monday.

Later,

Malte

----------
Malte Ubl - Germany - http://goKewl.com/
The beats of 1000 hearts inside ... the merciless pulsation ... and all I know is I'll be back ... back to trance nation!

They have: 5,633 posts

Joined: Jan 1970

Hi,

I'm really sorry for posting this questions, but I really dont know what else to do.

The following script does work in IE but it doesnt in NS. There is nothing in there that should be a problem for 4.x browsers, so it must be a really stupid mistake.

NS says "ZIP211 is not defined".

<edit>I deleted the HTML because now there is a live demo</edit>

Thank you so much for reading this far.

Later,

Malte

----------
e="GENERATOR" content="Mozilla/4.5 [de] (Macintosh; I; PPC) [Netscape]">Malte Ubl - Germany - http://goKewl.com/
The beats of 1000 hearts inside ... the merciless pulsation ... and all I know is I'll be back ... back to trance nation!

They have: 5,633 posts

Joined: Jan 1970

I put up the live demo:

http://www.schaffhausen.de/test/addressen.html

I hope you guys can figure out what went wrong with that script.

...and I have another problem. I made a really fancy navigation bar with animated rollovers. The problem is that the thing is a little too slow and buggy. Maybe the reason why this kind of menu isnt used very often is because it doesnt work, but maybe you hardcore JavaScript hackers can figure out a solution.

Check out the 2nd script here:
http://www.schaffhausen.de/test/nav.html

Thanx,

Malte

They have: 268 posts

Joined: May 1999

Just a quick thought. I didn't see any images with a NAME=ZIP211. This is required for Netscape.

Hope this helps.

----------
My goal in life is found in Phillipians 4:8-9

My goal in life is found in Phillipians 4:8-9
shoutingrock.org/troop214

They have: 5,633 posts

Joined: Jan 1970

Is it? The ZIPs are only the replacements for the original images. I dont think there has to be an actual image with that name.

They have: 268 posts

Joined: May 1999

Just took another look. In this line I think you need a space before the = sign

ZIP211= new Image(164,70); ZIP211.src = "pics/ad/on/2_11.gif";

There are several lines that are similar to this. You might want to change them all.

----------
My goal in life is found in Phillipians 4:8-9

My goal in life is found in Phillipians 4:8-9
shoutingrock.org/troop214

They have: 5,633 posts

Joined: Jan 1970

I'll try it tomorrow at work, but I dont think it'll make a difference. If Netscape's parser has at least a minimum skill it should see that because the equal sign cant be part ob the object name it must be meant as an equal sign.

I'll try it out anyway (although I think I did it before),

John Pollock, do you have an opinion about this?

They have: 5,633 posts

Joined: Jan 1970

I tried it. Unfortunately it doesnt make a difference.

----------
Malte Ubl - [red]Germany[/red] - http://goKewl.com/
[red]The beats of 1000 hearts inside...[/red] the merciless pulsation... [red]and all I know is I'll be back...[/red] back to trance nation!

John Pollock's picture

He has: 628 posts

Joined: Mar 1999

I have been trying it for a couple of hours now and still I can't get it in NS.

I'm going to have to rest it for a little while and try again later. Sad

----------
Page Resource: http://www.pageresource.com
JavaScript City: http://www.javascriptcity.com

They have: 5,633 posts

Joined: Jan 1970

I appreciate it.

They have: 5,633 posts

Joined: Jan 1970

I'm not really sure about this, but I think I know the problem. I did anothe page with mouseovers and it didnt work either. The I removed the functions which do thew more comlicated image exchanges and changed the images directly in the mouseover tag ... and it worked.

Seems like NS cant see the image object inside the function.

Could this be? Is there a solution?

Thanx,

Malte

----------
Malte Ubl - [red]Germany[/red] - http://goKewl.com/
[red]The beats of 1000 hearts inside...[/red] the merciless pulsation... [red]and all I know is I'll be back...[/red] back to trance nation!

John Pollock's picture

He has: 628 posts

Joined: Mar 1999

Yes, it seems that for some reason is what is happening. It sends back an "incorrect number of arguments" error every time, with the image not being defined.

I'm on the lookout to see what it is, I'll let you know if I find out anything new. Smiling

----------
Page Resource: http://www.pageresource.com
JavaScript City: http://www.javascriptcity.com

They have: 5,633 posts

Joined: Jan 1970

For a second I thought I had the problem. I changed all the 's in the SwitchGif function to "", but it had no positive effect.

Later,

Malte

They have: 5,633 posts

Joined: Jan 1970

I somehow solved this. I have the images preloaded onLoad for Netscape, and simply executed for IE. That way it works in both browsers. Really weird.

Later,

Malte

----------
Malte Ubl - [red]Germany[/red] - http://goKewl.com/
[red]The beats of 1000 hearts inside...[/red] the merciless pulsation... [red]and all I know is I'll be back...[/red] back to trance nation!

John Pollock's picture

He has: 628 posts

Joined: Mar 1999

That is pretty weird...but if it works then it that is what counts.
Smiling

----------
Page Resource: http://www.pageresource.com
JavaScript City: http://www.javascriptcity.com

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.