Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Roll-over image help please.
Old 08-22-2007, 03:47 PM Roll-over image help please.
Super Talker

Posts: 103
Name: Ewan T.
Location: Toronto
Trades: 0
I am using this script to create roll over image for my buttons. The problem is the last button is the only one rolling over when you go on any other button as you can see here http://www.freewebs.com/wwefansconr/mainpage.htm

I put them all one after another. So I don't know if thats the problem.

Please help me. Thanks.

Code:

<SCRIPT TYPE="text/javascript">
<!--
// copyright 1999 Idocs, Inc. http://www.idocs.com/tags/
// Distribute this script freely, but please keep this 
// notice with the code.
var rollOverArr=new Array();
function setrollover(OverImgSrc,pageImageName)
{
if (! document.images)return;
if (pageImageName == null)
pageImageName = document.images[document.images.length-1].name;
rollOverArr[pageImageName]=new Object;
rollOverArr[pageImageName].overImg = new Image;
rollOverArr[pageImageName].overImg.src=OverImgSrc;
}
function rollover(pageImageName)
{
if (! document.images)return;
if (! rollOverArr[pageImageName])return;
if (! rollOverArr[pageImageName].outImg)
{
rollOverArr[pageImageName].outImg = new Image;
rollOverArr[pageImageName].outImg.src = document.images[pageImageName].src;
}
document.images[pageImageName].src=rollOverArr[pageImageName].overImg.src;
}
function rollout(pageImageName)
{
if (! document.images)return;
if (! rollOverArr[pageImageName])return;
document.images[pageImageName].src=rollOverArr[pageImageName].outImg.src;
}
//-->
</SCRIPT>
<A 
HREF="http://www.freewebs.com/wwefansconr/mainpage.htm"
onMouseOver = "rollover('home')" 
onMouseOut = "rollout('home')" 
><IMG 
SRC="http://www.freewebs.com/wwefansconr/homebutton.PNG" 
NAME="home" 
ALT="Home Page" BORDER=0 
HEIGHT=55 WIDTH=152
></A>
<SCRIPT TYPE="text/javascript">
<!--
setrollover("http://www.freewebs.com/wwefansconr/homebutton2.PNG");
//-->
</SCRIPT>
Ewan is offline
Reply With Quote
View Public Profile Visit Ewan's homepage!
 
 
Register now for full access!
Old 08-22-2007, 04:15 PM Re: Roll-over image help please.
coolkbk585's Avatar
Be good this Christmas!

Latest Blog Post:
KBlog has been deativated
Posts: 642
Name: Kyle
Location: Ada, MI
Trades: 0
Try changing the onMouseOver and onMouseOut into the image tag.
coolkbk585 is offline
Reply With Quote
View Public Profile Visit coolkbk585's homepage!
 
Old 08-22-2007, 04:24 PM Re: Roll-over image help please.
Super Talker

Posts: 103
Name: Ewan T.
Location: Toronto
Trades: 0
like <img></img> ?
Ewan is offline
Reply With Quote
View Public Profile Visit Ewan's homepage!
 
Old 08-22-2007, 04:29 PM Re: Roll-over image help please.
coolkbk585's Avatar
Be good this Christmas!

Latest Blog Post:
KBlog has been deativated
Posts: 642
Name: Kyle
Location: Ada, MI
Trades: 0
no...try

Code:
<img src="...." title="....." onMouseOver="...." onMouseOut="....">
and take it out of the <a></a> tag.
coolkbk585 is offline
Reply With Quote
View Public Profile Visit coolkbk585's homepage!
 
Old 08-22-2007, 05:27 PM Re: Roll-over image help please.
Super Talker

Posts: 103
Name: Ewan T.
Location: Toronto
Trades: 0
It doesn't work. Whenever I put more than one rollover image they mess up.
Ewan is offline
Reply With Quote
View Public Profile Visit Ewan's homepage!
 
Old 08-22-2007, 11:09 PM Re: Roll-over image help please.
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Why not dump the javascript rollovers entirely and just use a CSS-based menu ? It's soo much simpler.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 08-22-2007, 11:22 PM Re: Roll-over image help please.
coolkbk585's Avatar
Be good this Christmas!

Latest Blog Post:
KBlog has been deativated
Posts: 642
Name: Kyle
Location: Ada, MI
Trades: 0
Quote:
Originally Posted by LadynRed View Post
Why not dump the javascript rollovers entirely and just use a CSS-based menu ? It's soo much simpler.
That's an idea!
__________________
<?php if($Adsense_Revenue > 0): define('HAPPINES','100%'); else: define('HAPPINESS', '0%') endif; ?>
coolkbk585 is offline
Reply With Quote
View Public Profile Visit coolkbk585's homepage!
 
Old 08-23-2007, 01:49 PM Re: Roll-over image help please.
Super Talker

Posts: 103
Name: Ewan T.
Location: Toronto
Trades: 0
How do I use CSS. I'm using this guide for the java one; http://www.htmlcodetutorial.com/imag...amsupp_80.html and this is what i got so far; http://www.freewebs.com/wwefansconr/test.htm

Not working as you can see

Can you please help me with it or do u have a link to show me how to do it with CSS.

Thanks.
Ewan is offline
Reply With Quote
View Public Profile Visit Ewan's homepage!
 
Old 08-23-2007, 09:06 PM Re: Roll-over image help please.
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Take your pick: http://www.cssplay.co.uk/menus/
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Roll-over image help please.
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB 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.28496 seconds with 12 queries