/    Sign up×
Community /Pin to ProfileBookmark

mouse link javascript please help me!!!!

[CODE]var rate = 20;
var obj;
var act = 0;
var elmH = 0;
var elmS = 128;
var elmV = 255;
var clrOrg;
var TimerID;
if (navigator.appName.indexOf(“Microsoft”,0) != -1 && parseInt(navigator.appVersion) >= 4) {
Browser = true;
} else {
Browser = false;
}
if (Browser) {
document.onmouseover = doRainbowAnchor;
document.onmouseout = stopRainbowAnchor;
}
function doRainbow()
{
if (Browser && act != 1) {
act = 1;
obj = event.srcElement;
clrOrg = obj.style.color;
TimerID = setInterval(“ChangeColor()”,100);
}
}
function stopRainbow()
{
if (Browser && act != 0) {
obj.style.color = clrOrg;
clearInterval(TimerID);
act = 0;
}
}
function doRainbowAnchor()
{
if (Browser && act != 1) {
obj = event.srcElement;
while (obj.tagName != ‘A’ && obj.tagName != ‘BODY’) {
obj = obj.parentElement;
if (obj.tagName == ‘A’ || obj.tagName == ‘BODY’)
break;
}
if (obj.tagName == ‘A’ && obj.href != ”) {
act = 1;
clrOrg = obj.style.color;
TimerID = setInterval(“ChangeColor()”,100);
}
}
showPopupText();
}
function stopRainbowAnchor()
{
if (Browser && act != 0) {
if (obj.tagName == ‘A’) {
obj.style.color = clrOrg;
clearInterval(TimerID);
act = 0;
}
}
}
function ChangeColor()
{
obj.style.color = makeColor();
}
function makeColor()
{
if (elmS == 0) {
elmR = elmV; elmG = elmV; elmB = elmV;
}
else {
t1 = elmV;
t2 = (255 – elmS) * elmV / 255;
t3 = elmH % 60;
t3 = (t1 – t2) * t3 / 60;
if (elmH < 60) {
elmR = t1; elmB = t2; elmG = t2 + t3;
}
else if (elmH < 120) {
elmG = t1; elmB = t2; elmR = t1 – t3;
}
else if (elmH < 180) {
elmG = t1; elmR = t2; elmB = t2 + t3;
}
else if (elmH < 240) {
elmB = t1; elmR = t2; elmG = t1 – t3;
}
else if (elmH < 300) {
elmB = t1; elmG = t2; elmR = t2 + t3;
}
else if (elmH < 360) {
elmR = t1; elmG = t2; elmB = t1 – t3;
}
else {
elmR = 0; elmG = 0; elmB = 0;
}
}
elmR = Math.floor(elmR);
elmG = Math.floor(elmG);
elmB = Math.floor(elmB);
clrRGB = ‘#’ + elmR.toString(16) + elmG.toString(16) + elmB.toString(16);
elmH = elmH + rate;
if (elmH >= 360)
elmH = 0;
return clrRGB;
}[/CODE]

can anyone help me see the code on above?
something was wrong and cannot work

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@KorSep 16.2007 — You forgot to tell us [I]what[/I] that code should do and [I]what[/I] is wrong...
Copy linkTweet thisAlerts:
@bals28mjkSep 16.2007 — Omit the call to the showPopupText() function, it doesn't exist. Just a heads up, your script only works for Internet Explorer; it won't work in browsers like Mozilla Firefox or Netscape Navigator if you didn't know that already.

Edit: Kor, makes the links flash different colors inside anchor elements for ie in case you were still curious ?
Copy linkTweet thisAlerts:
@KorSep 16.2007 — 
Edit: Kor, makes the links flash different colors inside anchor elements for ie in case you were still curious ?[/QUOTE]

[B]notalk0[/B] should have told us which was his problem. We have no magic bowl to guess what in fact somebody [I]wants[/I] from a code, even we can see what that code [I]supposes to do[/I].
Copy linkTweet thisAlerts:
@bals28mjkSep 16.2007 — We have no magic bowl to guess what in fact somebody wants from a code, even we can see what that code supposes to do.[/QUOTE]Speak for yourself I'll guess all I want ?. I'm fairly certain this is what they wanted as you should be now as well.
×

Success!

Help @notalk0 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...