Bluepearl Design
Go Back   Bluepearl Design > Misc > Tutorials > HTML, XHTML, Javascript, CSS

[JavaScript] Fading affliliate links.

HTML HyperText Markup Language.
XHTML Extensible Hypertext Markup Language.
JAVASCRIPT object-based scripting programming language.
CSS Cascading Style Sheets.

    

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
Old 03-13-2004, 09:03 AM   #1 (permalink)
 
Sean's Avatar
 
Title: Founder/Admin
Join Date: Jan 2004
Location: Sydney, Australia
Age: 28
Posts: 8,825
Images: 386
Blog Entries: 3
Rep Power: 10 Sean will become famous soon enough
Send a message via MSN to Sean Send a message via Skype™ to Sean
Re: [JavaScript] Fading affliliate links.

This is a a very simple code to allow your affiliate buttons to be at 20% alpha (trasparent), and then when hovered on with the mouse cursor they fade up too 100%

Ok here is the whole code:

HTML Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
  <TITLE>Untitled Document</TITLE>
<SCRIPT LANGUAGE="javascript">
nereidFadeObjects = new Object();

nereidFadeTimers = new Object();

function nereidFade(object, destOp, rate, delta){
if (!document.all)
return
if (object != "[object]"){ //do this so I can take a string too

setTimeout("nereidFade("+object+","+destOp+","+rate+","+delta+")",0);
return;
}

clearTimeout(nereidFadeTimers[object.sourceIndex]);

diff = destOp-object.filters.alpha.opacity;
direction = 1;
if (object.filters.alpha.opacity > destOp){
direction = -1;
}
delta=Math.min(direction*diff,delta);
object.filters.alpha.opacity+=direction*delta;

if (object.filters.alpha.opacity != destOp){
nereidFadeObjects[object.sourceIndex]=object;

nereidFadeTimers[object.sourceIndex]=setTimeout("nereidFade(nereidFadeObjects["+object.sourceIndex+"],"+destOp+","+rate+","+delta+")",rate);
}
}

if (document.images) {

var offimg = new Array()
offimg["cool"] = new Image(120,50)
offimg["cool"].src = "[INSERT]"

function imageOn(imgName) {
if (document.images) {
document.images[imgName].src = onimg[imgName].src
}
}

function imageOff(imgName) {
if (document.images) {
document.images[imgName].src = offimg[imgName].src
}
}

function setMsg(msg) {
window.status = msg
return true
}

function playIt() {
}
}
</Script>
</HEAD>

<BODY BGCOLOR="#FFFFFF">
<a href="http://www.griffin-webpages.com" target="_blank"><img border="0" src="http://www.griffin-webpages.com/affiliates/griffin2.jpg" style="filter:alpha(opacity=20)" onmouseover="nereidFade(this,100,30,10)" onmouseout="nereidFade(this,30,50,5)" border="0" width="88" height="31"></a>

</BODY>
</HTML> 
This is pretty much self explanatory, but if anyone has any questions dont hesistate to ask

Last edited by Sean; 09-09-2004 at 11:50 PM.
Sean is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-13-2004, 09:32 AM   #2 (permalink)
 
Title: Bluepearl Veteran
Join Date: Mar 2004
Age: 17
Posts: 710
Rep Power: 5 Hayden is on a distinguished road
Send a message via MSN to Hayden
Re: [JavaScript] Fading affliliate links.

where do i put the java script in do i just write it on my web page ?
__________________
Hayden is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-13-2004, 09:40 AM   #3 (permalink)
 
Sean's Avatar
 
Title: Founder/Admin
Join Date: Jan 2004
Location: Sydney, Australia
Age: 28
Posts: 8,825
Images: 386
Blog Entries: 3
Rep Power: 10 Sean will become famous soon enough
Send a message via MSN to Sean Send a message via Skype™ to Sean
Re: [JavaScript] Fading affliliate links.

place the javascript between your <head> </head> tags as that is the best place for javascript.

Last edited by Sean; 06-09-2005 at 03:27 AM.
Sean is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-13-2004, 11:21 AM   #4 (permalink)
 
Title: Bluepearl Veteran
Join Date: Mar 2004
Age: 17
Posts: 710
Rep Power: 5 Hayden is on a distinguished road
Send a message via MSN to Hayden
Re: [JavaScript] Fading affliliate links.

sorry i meant like can you use it in dreamweaver ?
__________________
Hayden is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-13-2004, 11:35 AM   #5 (permalink)
 
Sean's Avatar
 
Title: Founder/Admin
Join Date: Jan 2004
Location: Sydney, Australia
Age: 28
Posts: 8,825
Images: 386
Blog Entries: 3
Rep Power: 10 Sean will become famous soon enough
Send a message via MSN to Sean Send a message via Skype™ to Sean
Re: [JavaScript] Fading affliliate links.

sorry Hayden got no idea about dreamweaver.
Sean is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-30-2004, 10:05 PM   #6 (permalink)
 
Title: Bluepearl Veteran
Join Date: Jan 2004
Posts: 409
Rep Power: 5 Blackhawk is on a distinguished road
Re: [JavaScript] Fading affliliate links.

lol quote - "very simple code"

about 2 pages long ...

to complex for my brain
__________________
Blackhawk is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-31-2004, 05:56 PM   #7 (permalink)
 
Funni's Avatar
 
Title: Member
Join Date: Mar 2004
Location: Berlin
Posts: 22
Rep Power: 0 Funni is on a distinguished road
Send a message via ICQ to Funni Send a message via AIM to Funni Send a message via MSN to Funni
Re: [JavaScript] Fading affliliate links.

Blackhawk:

hahahah nice answer

but its work a take it and put on my side and "PERFECT"
__________________
"Es Kann nur einen GEBEN"


/// ((©2005)) \\\
** my Sig is chit please help **
Funni is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-31-2004, 06:06 PM   #8 (permalink)
 
Sean's Avatar
 
Title: Founder/Admin
Join Date: Jan 2004
Location: Sydney, Australia
Age: 28
Posts: 8,825
Images: 386
Blog Entries: 3
Rep Power: 10 Sean will become famous soon enough
Send a message via MSN to Sean Send a message via Skype™ to Sean
Re: [JavaScript] Fading affliliate links.

lol if anybody wants me to explain this in more details dont hesistate to ask
Sean is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-31-2004, 06:25 PM   #9 (permalink)
 
Title: Bluepearl Veteran
Join Date: Mar 2004
Age: 17
Posts: 710
Rep Power: 5 Hayden is on a distinguished road
Send a message via MSN to Hayden
Re: [JavaScript] Fading affliliate links.

hehehhe since i did the tutorials at www.echoecho.com i now understand what you mean griffin
__________________
Hayden is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-05-2004, 09:54 AM   #10 (permalink)
 
Title: Member
Join Date: Apr 2004
Location: B.C Canada
Posts: 1
Rep Power: 0 *St*ReAm* is on a distinguished road
Send a message via AIM to *St*ReAm* Send a message via MSN to *St*ReAm*
Re: [JavaScript] Fading affliliate links.

Where do u put the code???
__________________
*St*ReAm* is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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 On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads for: [JavaScript] Fading affliliate links.
Thread Thread Starter Forum Replies Last Post
Bluepearl Links Directory Launched Bluepearl Feeds RSS Feeds 0 09-07-2007 09:12 PM
Trading Affiliate Links!! wasahobo General Chat 6 05-04-2006 02:14 AM
Watcher's Link's Watcher Web Sites 1 11-10-2005 03:37 PM


  
Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Bluepearl Templates

All times are GMT +11. The time now is 04:15 PM.

 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52