|
|
|
|
![]() ![]() |
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?
|
|
|
|
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?
|
|
|
|
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. If you need more help, PM me! |
|
|
|
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...
|
|
|
|
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.
|
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 8th September 2008 - 11:52 AM |