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.

JavaScript Forum


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



Reply
Javascript Rollover not working.
Old 08-23-2007, 03:33 PM Javascript Rollover not working.
Super Talker

Posts: 103
Name: Ewan T.
Location: Toronto
Trades: 0
Im using the script below to make rollover buttons but its not working as you can see here; http://www.freewebs.com/wwefansconr/test.htm

Could you please help me?

Code:
<A 
    HREF="mainpage.htm"
    onMouseOver = "rollover('homebutton"')"
    onMouseOut = "rollout('homebutton"')"
    ><IMG 
    SRC="homebutton.PNG"
    NAME="homebutton"
    HEIGHT=52 WIDTH=116 BORDER=0 ALT="homebutton"
    ></A>
<SCRIPT TYPE="text/javascript">
<!--
setrollover('homebutton2.PNG');
//-->
</SCRIPT>
<A 
    HREF="raw.htm"
    onMouseOver = "rollover('resume')"
    onMouseOut = "rollout('resume')"
    ><IMG 
    SRC="rawbutton.PNG"
    NAME="resume"
    HEIGHT=52 WIDTH=116 BORDER=0 ALT="resume"
    ></A>
<SCRIPT TYPE="text/javascript">
<!--
setrollover('rawbutton2.PNG');
//-->
</SCRIPT>
<A 
    HREF="smackdown.htm"
    onMouseOver = "rollover('resume')"
    onMouseOut = "rollout('resume')"
    ><IMG 
    SRC="sdbutton.PNG"
    NAME="resume"
    HEIGHT=52 WIDTH=116 BORDER=0 ALT="resume"
    ></A>
<SCRIPT TYPE="text/javascript">
<!--
setrollover('sdbutton2.PNG');
//-->
</SCRIPT>
<A 
    HREF="ecw.htm"
    onMouseOver = "rollover('resume')"
    onMouseOut = "rollout('resume')"
    ><IMG 
    SRC="ecwbutton.PNG"
    NAME="resume"
    HEIGHT=52 WIDTH=116 BORDER=0 ALT="resume"
    ></A>
<SCRIPT TYPE="text/javascript">
<!--
setrollover('ecwbutton2.PNG');
//-->
</SCRIPT>
<A 
    HREF="ppv.htm"
    onMouseOver = "rollover('specs')"
    onMouseOut = "rollout('specs')"
    ><IMG 
    SRC="ppvbutton.PNG"
    NAME="specs"
    HEIGHT=52 WIDTH=116 BORDER=0 ALT="specs"
    ></A>
<SCRIPT TYPE="text/javascript">
<!--
setrollover('ppvbutton2.PNG');
//-->
</SCRIPT>
 
 
 
 
 
 

<!-- --><script type="text/javascript" src="/i.js"></script><script type="text/javascript">if(typeof(urchinTracker)=='function'){_uacct="UA-230305-2";_udn="freewebs.com";urchinTracker();}</script>
Ewan is offline
Reply With Quote
View Public Profile Visit Ewan's homepage!
 
 
Register now for full access!
Old 08-23-2007, 07:01 PM Re: Javascript Rollover not working.
logic ali's Avatar
Super Talker

Posts: 104
Trades: 0
Quote:
Originally Posted by Ewan View Post
<!-- --><script type="text/javascript" src="/i.js"></script>
Presumably the script is in the file referenced above.
The script must be included somewhere before any reference made to it in the document.
You can put those tags in the <head>section, at least you could if your document had one.
logic ali is offline
Reply With Quote
View Public Profile
 
Old 08-24-2007, 12:38 PM Re: Javascript Rollover not working.
coolkbk585's Avatar
Be good this Christmas!

Latest Blog Post:
KBlog has been deativated
Posts: 642
Name: Kyle
Location: Ada, MI
Trades: 0
Why not just do what you're trying to do with CSS instead of Javascript? It's easier.

Tell me if you'd like to know how to do that.
__________________
<?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-24-2007, 06:20 PM Re: Javascript Rollover not working.
Super Talker

Posts: 103
Name: Ewan T.
Location: Toronto
Trades: 0
Yeah if you can find a script that I can just copy and paste that would be great.
Ewan is offline
Reply With Quote
View Public Profile Visit Ewan's homepage!
 
Old 08-24-2007, 10:02 PM Re: Javascript Rollover not working.
logic ali's Avatar
Super Talker

Posts: 104
Trades: 0
Quote:
Originally Posted by Ewan View Post
Im using the script below to make rollover buttons but its not working as you can see here; http://www.freewebs.com/wwefansconr/test.htm
I just looked at your page again and the only script included has nothing to do with rollovers.
If you want a script to work, you need to include it in the document according to its instructions.
logic ali is offline
Reply With Quote
View Public Profile
 
Old 08-25-2007, 10:09 AM Re: Javascript Rollover not working.
ExpressoDan's Avatar
Ultra Talker

Posts: 317
Name: This Space for Rent
Location: Georgia
Trades: 0
You have got to get rid of the javascrpt...

use css
Code:
a:link, a:visited, a:active {
	text-decoration: none;
	background-image: url(../img/image.gif);
}
a:hover {
	text-decoration: none;
	background-image: url(../img/other-image.gif);
}
Granted, this will apply to all your links, but you could apply it to a class for your menu.
__________________

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

"I think therefore I am, I think." <!-- George Carlin
ExpressoDan is offline
Reply With Quote
View Public Profile Visit ExpressoDan's homepage!
 
Old 08-27-2007, 06:08 PM Re: Javascript Rollover not working.
Super Talker

Posts: 132
Trades: 0
I would suggest that you use XHTML.
soap is offline
Reply With Quote
View Public Profile
 
Old 08-27-2007, 07:54 PM Re: Javascript Rollover not working.
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
Quote:
Originally Posted by soap View Post
I would suggest that you use XHTML.
What for ?
What will Xhtml changes about the rollover ?

For the record, Xhtml is a stricter and more XML like version of html, nothing more.
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Reply     « Reply to Javascript Rollover not working.
 

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