Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Make Image Change When Hovered W/o Flash?, How?
PHPtech
post Mar 24 2005, 11:31 PM
Post #1


Member [Level 1]
****

Group: Members
Posts: 66
Joined: 18-March 05
Member No.: 4,687



Is there a way to make images on a page change without having to use flash/ Java?
Go to the top of the page
 
+Quote Post
whyme
post Mar 24 2005, 11:35 PM
Post #2


Privileged Member
*********

Group: Members
Posts: 661
Joined: 10-January 05
Member No.: 3,189



java as in javascript?
Go to the top of the page
 
+Quote Post
snlildude87
post Mar 24 2005, 11:44 PM
Post #3


Moderator
***************

Group: Members
Posts: 2,325
Joined: 8-March 05
From: Mawson, Antarctica
Member No.: 4,254



Indeed there is, PHPtech! This is what I do on my website on the pages that I want a rollover image:

1. Create a blank file named rollover.js
2. Move rollover.js to the same folder/directory as the html file you want the rollover picture to show
3. Open rollover.js
4. Copy and paste the following code to rollover.js:
CODE

img = new Image();
img.src = "yourimage.jpg";

Replace "yourimage.jpg" with the name of your image
5. Save rollover.js
6. Open the html file/page that you want the rollover picture to be in
7. Copy and paste the following code between the <head></head> tags in the html file:
CODE

<script  type="text/javascript" language="JavaScript" src="rollover.js"></script>

8. Copy and paste the following code to your html file:
CODE

<a href="link_to_go_to_when_clicked.html" onmouseover="img.src='your_mouse_over_picture.jpg';" onmouseout="img.src='normal_picture.jpg';"><img src="normal_picture.jpg" border="0" name="img"></a>

*Replace link_to_go_to_when_clicked.html with the page to go to when your rollover image is clicked. If you don't want a link, simply remove the <a></a> tags surrounding the rollover picture.
*Replace your_mouse_over_picture.jpg with the picture you want to show when your mouse is hovering over the picture (the normal picture)
*Replace normal_picture.jpg with the picture to show when your mouse is NOT over the picture.

smile.gif

If you need more help, PM me! smile.gif
Go to the top of the page
 
+Quote Post
PHPtech
post Mar 24 2005, 11:44 PM
Post #4


Member [Level 1]
****

Group: Members
Posts: 66
Joined: 18-March 05
Member No.: 4,687



No, Java as in the langauge that requires this program, www.java.com, Java and Javascript are two diferent langauges...
Go to the top of the page
 
+Quote Post
whyme
post Mar 25 2005, 12:12 AM
Post #5


Privileged Member
*********

Group: Members
Posts: 661
Joined: 10-January 05
Member No.: 3,189



that's what i thought, as you can't do much 'html' rollovers in java. anyways, snlildudes, got a great exmaple.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Key Logger.(36)
  2. Read-only Folders In Xp(13)
  3. A Pretty Good Easy Way To Make Some Money(21)
  4. Delay X Seconds In Flash(1)
  5. How Do I Make Gold Fast In Runescape/(126)
  6. How Do I Make A Website(20)
  7. Make Money Online!(17)
  8. Best Ways To Make Money In Runescape(12)
  9. How To Make A Counter Strike 1.6 Dedicated Server(16)
  10. Runescape Private Server(69)
  11. Do You Use Imagefilez.com?(34)
  12. Virus On Your Flash Disk? (usb Devices)(15)
  13. How To Get A Girl That Has Refused You(12)
  14. What Kind Of Car Do You Have?(26)
  15. Is It Really Possible To Make Any Money Online?(17)
  1. Budding Java Game Developers?(9)
  2. How To Make A Website ?(11)
  3. How To Make Your Own Counter Strike Source Dedicated Server!(36)
  4. I Need Some Help With Flash And Div Overlay(5)
  5. Paypal(10)
  6. File Sharing Hosts!(3)
  7. Which Flash Drive Do You Use?(25)
  8. Make Free Money Online(2)
  9. Make An Extra $50 Or More Per Day!(5)
  10. Unable To Change Cpanel Password(5)
  11. Text Size In "fill-in" Form Blanks(2)
  12. Flash Tutorial Simple Motion Tween(0)
  13. Free (legal) Flash Editor? Anyone?(8)


 



- Lo-Fi Version Time is now: 8th September 2008 - 11:52 AM