Link to home
Start Free TrialLog in
Avatar of Kapow
Kapow

asked on

Double image swap on mouse-over HELP

Have a look at my new website www.wordsandpeople.com an ERROR MESSAGE appears in the browser screen. How can I correct it? I think it is because of the Java Script code for my double image swaps when the mouse is over any of the images of strawberrys.
Avatar of cheekycj
cheekycj
Flag of United States of America image

I looked at the code and I didn't see the function MM_preloadImages('but1_up.jpg','text1.gif','text2.gif','text3.gif','text4.gif') defined anywhere?

CJ
Avatar of Kapow
Kapow

ASKER

My code has the following: <body onLoad="MM_preloadImages('but1_up.jpg','text1.gif','text2.gif','text3.gif','text4.gif')" bgcolor="#FFFFFF" text="#183888" link="#183888" vlink="#183888" alink="#183888">
Is that what your talking about? or are you saying that something else is missing???
I was just wondering where that function was defined, I didn't see it in the code.

CJ
Avatar of Mark Franz
Look at your OnMouse calls, whats wrong with this line?

onMouseOut="di20('strawb1','but1_dwn.jpg');di20('textBlnk.gif','textBlnk.gif');"  onMouseOver="di20('strawb1','but1_up.jpg');di20('textBlnk.gif','text1.gif');

You are passing two sets of values to di20, try this;

onMouseOut="di20('strawb1','but1_dwn.jpg');"  onMouseOver="di20('strawb1','but1_up.jpg');"
Avatar of Kapow

ASKER

To mqfranz: I tried it and lost the 2nd image swap.  What should I do to my code so that both images swap on mouse over without an ERROR MESSAGE appearing in the browser?
I have fixed your page, but I need you to send me the but1_up.jpg file for verification.  My email is mark.franz@lpl.com.  There were a couple things that needed modifying.

Mark
ASKER CERTIFIED SOLUTION
Avatar of Mark Franz
Mark Franz
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Kapow

ASKER

EXCELLENT !!!
That seems to do it.  I will upload it to my host this weekend and test it once more, and send you those 100 well earned points.

I was hoping to understand how to fix the problem myself. Did you write the code manually or use an authoring tool?
Where do you suggest I start so that I can learn to sort out that kind of problem?

Many thanks - Andy
Avatar of Kapow

ASKER

Thankyou Mark
www.wordsandpeople.com is now error free. Thankyou

Do you authoring tools you mentioned create Java Script for you or is that all in your head?

Oh my.... do I store Javascript in my head?  No, it is mostly just regular scripting, it's knowing the objects and statements that work with JS as well as VBS that I keep upstairs... :-)

Although, there are a few authoring tools that create JS, Adobe ImageReady 2.0 is one that I have seen create JS, as well as DreamWeaver and DrumBeat, the later two are relatively expensive and difficult to learn for the beginner, check out Homesite 4.5 and CoffeCup 8.0 for nice editors.  CoffeeCup includes some nice JS script with the code.