User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Geeks' Lounge section within the Coffee House category of DaniWeb, a massive community of 403,388 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,574 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Geeks' Lounge advertiser: Programming Forums
Views: 3411 | Replies: 13
Reply
Join Date: Oct 2004
Location: Marysville, WA
Posts: 117
Reputation: hammy is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 1
hammy's Avatar
hammy hammy is offline Offline
Junior Poster

I Need Help Making A Rollover Image!

  #1  
Oct 8th, 2004
Please help me with this. i really need to no how to make a rollover image 4 my site. a need a detailed discription please. i've looked on several sites and done several searches for help on making rollover images and none have helped me. i am using geocities as a webhost. if u help me i will give u positive feed back so please help me!
Xbox 360 x Halo 2= :cheesy:
Can't wait for halo 3 - 2007 -
Xbox Live Gamertag: aKillaMeatball
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Sep 2004
Posts: 6,073
Reputation: Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of 
Rep Power: 26
Solved Threads: 419
Super Moderator
Narue's Avatar
Narue Narue is online now Online
Expert Meanie

Re: I Need Help Making A Rollover Image!

  #2  
Oct 9th, 2004
<a href="link" onMouseOver="document.image.src='on.gif'" onMouseOut="document.image.src='off.gif'">
  <img src="off.gif" name="image">
</a>
It's pretty simple really, onMouseOver and onMouseOut are events that are triggered when the obvious happens: the mouse enters or leaves the image boundary. document is the current HTML file, image is the name of the image we're working with, and src is the value of the image. Assigning to document.image.src changes the image, and we only assign to it during an event. Notice in the second line that the name of the image is set and the original src is off.gif.
I'm a programmer. My attitude starts with arrogance, holds steady at condescension, and ends with hostility. Get used to it.
Reply With Quote  
Join Date: Oct 2004
Location: Mojave Desert
Posts: 2,425
Reputation: vegaseat will become famous soon enough vegaseat will become famous soon enough 
Rep Power: 9
Solved Threads: 173
Moderator
vegaseat's Avatar
vegaseat vegaseat is offline Offline
Kickbutt Moderator

Re: I Need Help Making A Rollover Image!

  #3  
Oct 9th, 2004
Originally Posted by Narue
<a href="link" onMouseOver="document.image.src='on.gif'" onMouseOut="document.image.src='off.gif'">
  <img src="off.gif" name="image">
</a>
It's pretty simple really, onMouseOver and onMouseOut are events that are triggered when the obvious happens: the mouse enters or leaves the image boundary. document is the current HTML file, image is the name of the image we're working with, and src is the value of the image. Assigning to document.image.src changes the image, and we only assign to it during an event. Notice in the second line that the name of the image is set and the original src is off.gif.

Give this person a cigar and hope it stays unlit. Nice work and helpful too! Do you get these handy little code fields by just putting
 some code here 
around your text?
May 'the Google' be with you!
Reply With Quote  
Join Date: Oct 2004
Location: Marysville, WA
Posts: 117
Reputation: hammy is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 1
hammy's Avatar
hammy hammy is offline Offline
Junior Poster

Re: I Need Help Making A Rollover Image!

  #4  
Oct 9th, 2004
wow! I've never seen such a short html code(or is it javascript) lol. its good..but, how do i do this if i am not making a page in html format? i dont know a lot about html so i prefer to just make my site in some sort of pagebuilder. i do no how to place javascripts however. so if thats what it is than no problem. Your good rep has been sent!
Xbox 360 x Halo 2= :cheesy:
Can't wait for halo 3 - 2007 -
Xbox Live Gamertag: aKillaMeatball
Reply With Quote  
Join Date: Sep 2004
Posts: 6,073
Reputation: Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of 
Rep Power: 26
Solved Threads: 419
Super Moderator
Narue's Avatar
Narue Narue is online now Online
Expert Meanie

Re: I Need Help Making A Rollover Image!

  #5  
Oct 9th, 2004
>i prefer to just make my site in some sort of pagebuilder
Even easier. A page builder should have a function that lets you insert a rollover without even touching the code. Unless it's a super cheap builder provided by a free web host. In that case you'll pretty much have to get your hands a little dirty.

>html code(or is it javascript)
It's both. a href and img src are HTML tags. The onMouseOver and onMouseOut events and properties are Javascript.
I'm a programmer. My attitude starts with arrogance, holds steady at condescension, and ends with hostility. Get used to it.
Reply With Quote  
Join Date: Oct 2004
Location: Marysville, WA
Posts: 117
Reputation: hammy is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 1
hammy's Avatar
hammy hammy is offline Offline
Junior Poster

Re: I Need Help Making A Rollover Image!

  #6  
Oct 10th, 2004
ok but i still need help on how to change the code and what to change it to. pretty much the only part i do no how to change and what to change to is the 'a href' part. lol sorry but im a little slow on some things and need to no things in detail :o . but if it makes u feel any better youve helped me the most! :p
here is a link to 2 sample images of mine that i have made, how bout this. u can create a code using those images, and then send that code to me, and that would better help me understand what parts to change to what.
mouse off image: http://www.geocities.com/all4halo2/up.gif
mouse on image: http://www.geocities.com/all4halo2/down.gif

Thank you sooo much 4 helping me out with this :cheesy:
Xbox 360 x Halo 2= :cheesy:
Can't wait for halo 3 - 2007 -
Xbox Live Gamertag: aKillaMeatball
Reply With Quote  
Join Date: Sep 2004
Posts: 6,073
Reputation: Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of 
Rep Power: 26
Solved Threads: 419
Super Moderator
Narue's Avatar
Narue Narue is online now Online
Expert Meanie

Re: I Need Help Making A Rollover Image!

  #7  
Oct 10th, 2004
Everywhere my code uses on.gif, you use down.gif and everywhere I used off.gif, you use up.gif. It's a simple substitution, then where I have "link", change it to "http://www.whateveryoururlis.com". The a href tag creates a hyperlink, like the following:

www.google.com

The img src tag displays an image and by nesting it in an a href tag, you create an image hyperlink where the link is an image rather than simple text.
I'm a programmer. My attitude starts with arrogance, holds steady at condescension, and ends with hostility. Get used to it.
Reply With Quote  
Join Date: Oct 2004
Location: Marysville, WA
Posts: 117
Reputation: hammy is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 1
hammy's Avatar
hammy hammy is offline Offline
Junior Poster

Re: I Need Help Making A Rollover Image!

  #8  
Oct 10th, 2004
ok heres the code i have so far. what else do i nned to change and what would i change it to?

<a href="http://www.geocities.com/all4halo2index" onMouseOver="document.image.src='down.gif'" onMouseOut="document.image.src='up.gif'">
  <img src="down.gif" name="image">
</a>
Xbox 360 x Halo 2= :cheesy:
Can't wait for halo 3 - 2007 -
Xbox Live Gamertag: aKillaMeatball
Reply With Quote  
Join Date: Sep 2004
Posts: 6,073
Reputation: Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of 
Rep Power: 26
Solved Threads: 419
Super Moderator
Narue's Avatar
Narue Narue is online now Online
Expert Meanie

Re: I Need Help Making A Rollover Image!

  #9  
Oct 10th, 2004
>what else do i nned to change
It depends. Does it work when you paste it into your HTML file? I don't see anything wrong, so the only issue would be whether the link is valid or not.
I'm a programmer. My attitude starts with arrogance, holds steady at condescension, and ends with hostility. Get used to it.
Reply With Quote  
Join Date: Oct 2004
Location: Marysville, WA
Posts: 117
Reputation: hammy is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 1
hammy's Avatar
hammy hammy is offline Offline
Junior Poster

Re: I Need Help Making A Rollover Image!

  #10  
Oct 10th, 2004
o wow. i didnt acutually try it before i posted me last message :o lol sorry. IT WORKS! YAY! you dont no how much i apratiate this. thank you so much :cheesy:
here is a link to the finished page(note this is note the real thing just the example)
http://www.geocities.com/all4halo2/rollover.html
Xbox 360 x Halo 2= :cheesy:
Can't wait for halo 3 - 2007 -
Xbox Live Gamertag: aKillaMeatball
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Geeks' Lounge Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Other Threads in the Geeks' Lounge Forum

All times are GMT -4. The time now is 9:30 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC