is this what you want?
Code:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>...</title>
<head>
<style type="text/css">
#colorShadesContainer{height:518px; width:95px; border:1px solid #D8D8D8;}
#colorShades{margin-left:2px; margin-top:2px; height:512px; width:89px; position:relative; border:1px solid #D8D8D8;}
#shadeblockOne{margin-left:1.5px; margin-top:2px; position:absolute; height:15px; width:85px;}
input.shadeOne{height:15px; width:85px;}
</style>
</head>
<body>
<div id="colorShadesContainer">
<div id="colorShades">
<div id="shadeblockOne"><input type="button" class="shadeOne" value="" title="" /></div>
</div>
</div>
<a href="#null" onclick="passToTheButton(0)">lightRed</a>
<br /><br />
<a href="#null" onclick="passToTheButton(1)">deadlyRed</a>
<script type="text/javascript">
var RedTonesHtmlHex=[
['lightRed','#ff0000'],
['deadlyRed','#cd141a']
// etc.
];
function passToTheButton(n){
var theButton=document.getElementById('shadeblockOne').getElementsByTagName('input')[0];
theButton.style.backgroundColor=RedTonesHtmlHex[n][1];
theButton.value=RedTonesHtmlHex[n][0];
}
</script>
</body>
</html>
Bookmarks