Reply
Rollover Script
Old 04-26-2005, 08:02 PM Rollover Script
Jdinh04's Avatar
Super Talker

Posts: 136
Name: J. Dinh
Location: Okemos, MI
For some reason, the code that I am using to have my buttons roll over isn't working. Maybe i'm using the wrong code?

Anyone want to post their rollover code?

Let me know, thanks.
Jdinh04 is offline
Reply With Quote
View Public Profile Visit Jdinh04's homepage!
 
When You Register, These Ads Go Away!
Old 04-27-2005, 05:23 PM
Jdinh04's Avatar
Super Talker

Posts: 136
Name: J. Dinh
Location: Okemos, MI
Anyone? I just registered, and so far it's not looking too good. If I need, I will post at a different forum if no one is going to help.
Jdinh04 is offline
Reply With Quote
View Public Profile Visit Jdinh04's homepage!
 
Old 05-04-2005, 11:41 AM
Novice Talker

Posts: 13
Location: Sydney Australia
i wrote this. it uses an image object in javascript to store the image you moused over then swaps it back again. this requires no name or id attributes and only one javascript image per button. it's really quick to use.

it works on simple websites without flicker. some navigation systems are too complex for this. put the javascript in the head of your doc. this won't work on older browsers but wont throw up any errors because the events are ignored in the img tag.



<script type="text/javascript">
var iHolder = new Image();
var iButtonA = new Image(); iButtonA.src = "something.gif";
var iButtonB = new Image(); iButtonB.src = "somethingelse.gif";
</script>

<img src="button.gif"
onmouseover="iHolder=this.src; this.src = iButtonA.src"
onmouseout="this.src = iHolder.src;">

<img src="button.gif"
onmouseover="iHolder=this.src; this.src = iButtonB.src"
onmouseout="this.src = iHolder.src;">


if you use it on your site i'd love to see it. this is royalty free for you!!!!!
rimian is offline
Reply With Quote
View Public Profile Visit rimian's homepage!
 
Old 05-15-2005, 04:06 PM
rogem002's Avatar
Webmaster Talker

Posts: 652
Name: Mike
Location: United Kingdom
Cool this was very helpful, thanks
__________________
PHP Code:
Add_Talkupation('rogem002'); // Because sharing is awesome! 
Fix 90% of your internet problems
rogem002 is offline
Reply With Quote
View Public Profile Visit rogem002's homepage!
 
Old 05-18-2005, 08:09 AM
Novice Talker

Posts: 13
Location: Sydney Australia
anytime.

i haven't seen anyone else do it that way yet. it works a treat.
rimian is offline
Reply With Quote
View Public Profile Visit rimian's homepage!
 
Reply     « Reply to Rollover Script
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.12735 seconds with 12 queries