PDA

View Full Version : about the mouseover ??


fsfl2k
02-01-2002, 04:27 PM
I've seen posts on a couple of different ways to do this effect and have a question conserning the different codes.
Of the two, what is the main difference between the two on performance issues.

Basically, for browser compatibility / easier to incorporate into later modifications or upgrades / server issues? / etc.
OTHER than one is Java script and one is not.

If I can use both, but only need one .... which would be the better overall performer and be the best for visitors.

Here they are (the parts I'm asking about):

onMouseover="this.style.backgroundColor='#F1F1F1';"
onMouseout="this.style.backgroundColor='#13486D';"


function NavRollOver(oTd) {if (!oTd.contains(event.fromElement)) {oTd.bgColor="#1C5780";}}
function NavRollOut(oTd) {if (!oTd.contains(event.toElement)) {oTd.bgColor="#13486D";}}


thanks,
Anthony

fsfl2k
02-02-2002, 02:10 PM
** bump **

No one has an opinion on this ??

JTMON
02-02-2002, 06:37 PM
Well I'm using this one now and it seems just fine:

http://vbulletin.com/forum/showthread.php?s=&threadid=38735

fsfl2k
02-02-2002, 07:34 PM
That would be the non-java one then.

java=0 non-java=1 :up:

Thanks for responding,
Anthony

Kaffeerappel
02-03-2002, 08:56 AM
Actually, both pieces of code are JavaScript, the first one is just a simple event handler while the second calls for an entire function.
I'd go for the first one as well.

fsfl2k
02-03-2002, 01:44 PM
Originally posted by Kaffeerappel
Actually, both pieces of code are JavaScript, the first one is just a simple event handler while the second calls for an entire function.
I'd go for the first one as well.

Well see .... that just proves my "noob-iness". I had no clue that they were both javascript.
(ya think maybe that's why no one was responding??)

Anyway, I appreciate you taking the time to reply as you not only educated someone, you made the vote 2 - 0, so I think I will also incorporate the first one.

thanks guys,
Anthony

jcroft
02-25-2002, 04:44 AM
First one is what I use, along with an onClick funtion to make the whole area clickable. I can't see the point of going to the trouble of the second way...first way is cleaner and simpler.