Question about rollover scripty thing
I like rollovers, i thkn they're fun and add a lot to a page. Since the first rollover i ever coded (ahh, memories) i have been using the same code; < a href="whatever" onmouseover="rollover.src='image1.jpg'" onmouseout="rollover.src='image.jpg'" > and all of that stuff. Now i've never had any problems with it, and as far as i can remember it works on netscape and IE, yet whenever i read on these or other forums, or take a peek at the source of some nicely done site they use some complicated JScript stuff with a portion in the head and all that. This way seems so much simpler, I must be missing something. What's the deal?
Thanks.
Keegan posted this at 05:22 — 4th September 2001.
They have: 300 posts
Joined: Aug 2001
Hi Fringey
I use
I don't know if it is any different.
It is generated by DW.
K
Mark Hensler posted this at 06:21 — 4th September 2001.
He has: 4,048 posts
Joined: Aug 2000
MM_swapImgRestore() and MM_swapImage() are defined in the header. That's what your seeing in the header.
You see that a lot because a lot of people use a Macromedia WYSIWYG editor to make their pages, and that's the way that Macromedia does rollevers. (MM=MacroMedia, get it?)
Mark Hensler
If there is no answer on Google, then there is no question.
Toeng.com posted this at 15:13 — 4th September 2001.
They have: 46 posts
Joined: Sep 2001
And also because most people pre-load their images in the header to make the transition process looks nicer. Your code is fine, don't worry about a thing.
Toeng.com - Kick @$$ WebSite
Fringey posted this at 02:59 — 5th September 2001.
They have: 68 posts
Joined: Apr 2001
thanks all, just checking. I was afraid it didn't work for a certain os or somthing and i didn't know about it.
Mark Hensler posted this at 06:19 — 5th September 2001.
He has: 4,048 posts
Joined: Aug 2000
I've always done it the same way as you, Fringey.
tmay posted this at 06:45 — 5th September 2001.
They have: 75 posts
Joined: Sep 2001
Me too, you're doing fine.
All the header part is doing is assigning the commands to a function name. Then in the body section, all you have to do is call on it by it's name. ( onLoad="name()" )
For simple mouseovers and small things like that, what you do is fine.
-Troy May
PC Sympathy
Admin at HFT Online
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.