Hej Claes
det her virker men så det ikke drop Down liste kan du se hva jeg gør galt ?
-----------------------------------------------------------------
<html xmlns="
http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>title here</title>
<script type="text/javascript">
SyntaxHighlighter.config.clipboardSwf = '/js/syntaxhighlighter/clipboard.swf';
SyntaxHighlighter.all();
</script>
<!-- start add by me -->
<SCRIPT language="JavaScript">
<!--
if (document.images)
{
image_off= new Image(100,100);
image_off.src="scare.jpg";
image2= new Image(100,100);
image2.src="../img/thumb1.jpg";
image3= new Image(100,100);
image3.src="../img/thumb2.jpg";
image4= new Image(100,100);
image4.src="../img/thumb1.jpg";
image5= new Image(100,100);
image5.src="../img/thumb2.jpg";
}
function change1(picName,imgName)
{
if (document.images)
{
imgOn=eval(imgName + ".src");
document[picName].src= imgOn;
}
}
//-->
</SCRIPT>
<!-- end add by me -->
</head>
<body>
<table border=0 cellpadding=15><tr><td>
<pre>
<code allow="none">
<div class="fake_select">
<input type="hidden" name="select1" value="" id="select1" />
<option><a name="fake_select1" id="fake_select_opt1" onMouseover="change1('pic1','image2')" onclick="set_fake_select(red); return false;">red</a></option>
<option><a name="fake_select1" id="fake_select_opt2" onMouseover="change1('pic1','image3')" onclick="set_fake_select(blue); return false;">blue</a></option>
<option><a name="fake_select1" id="fake_select_opt3" onMouseover="change1('pic1','image4')" onclick="set_fake_select(yellow); return false;">Yellow</a></option>
<option><a name="fake_select1" id="fake_select_opt4" onMouseover="change1('pic1','image2')" onclick="set_fake_select(x); return false;">Yellow</a></option>
<option><a name="fake_select1" id="fake_select_opt5" onMouseover="change1('pic1','image3')" onclick="set_fake_select(x2); return false;">Yellow2</a></option>
<option><a name="fake_select1" id="fake_select_opt6" onMouseover="change1('pic1','image4')" onclick="set_fake_select(x3); return false;">Yellow3</a></option>
<option><a name="fake_select1" id="fake_select_opt7" onMouseover="change1('pic1','image2')" onclick="set_fake_select(x4); return false;">Yellow4</a></option>
<option><a name="fake_select1" id="fake_select_opt8" onMouseover="change1('pic1','image3')" onclick="set_fake_select(x5); return false;">Yellow5</a></option>
</div>
</code>
</pre>
</td>
<td>
<P>
<IMG SRC="scare.jpg" name="pic1" width="100" height="100" border="0">
</td></tr></table>
<pre>
<code allow="none">
<style>
div.fake_select {
border: 1px solid #000;
width: 150px;
height: 25px;
overflow: auto;
}
div.fake_select a {
padding: 1px 3px;
margin: 0;
cursor: pointer;
cursor: hand;
border: 0;
border-bottom: 1px solid #ddd;
display: inline-block;
}
div.fake_select a:hover {
text-decoration: none;
color: #002;
}
div.fake_select a.active {
background-color: #ffcc33;
color: #ccff66;
}
</style>
</code>
</pre>
<pre>
<SCRIPT language="JavaScript">
function set_fake_select(id) {
//turn off any active options
var elems = document.getElementsByName("fake_select1");
for(var i=0; i < elems.length; i++) {
elems[i].className = "";
}
//mark the fake option as active
document.getElementById("fake_select_opt" + id).className = "active";
//store the value in the hidden form field for submission
document.getElementById("select1").value = id;
}
</script>
</pre>
</body>
</html>