Version: 2008
Advanced Search
advertisement
advertisement

Forum display:

Coding & scripting: Why isnt this javascript working?

by mirzaar - 11/8/07 4:58 PM
Post 1 of 1

Why isnt this javascript working?

by mirzaar - 11/8/07 4:58 PM

This code runs perfectly when i test it on dreamweaver or just plain notepad. But when i paste these lines of code onto my <a href="http://www.ziked.com">tumblr</a> theme, they dont work anymore. Any idea why??

<head>
<script language=“JavaScript”>
var backColor = new Array();
backColor[0] = ’#FF9900’;
backColor[1] = ’#6498cc’;
function changeBG(whichColor){
document.bgColor = backColor[whichColor];
}
</script></head>

<body>

<a href=“javascript:changeBG(0)”>Orange</a>
<a href=“javascript:changeBG(1)”>Blue</a>
</body>

If it helps, I still have the non-working javascipt on my site - ziked.com

Forum legend:
Locked Locked thread
Moderator Moderator
CNET staff CNET staff
Samsung staff Samsung staff
Norton Authorized Support team Norton Authorized Support team
AVG staff AVG staff
Windows Outreach team Windows Outreach team
Dell staff Dell staff
Intel staff Intel staff
Powered by Jive Software