Jeg tror, jeg forstår hvorfor nu (!)
Billederne er i løbet af index.html også sat "fast" på stederne. Og så nytter det ikke noget, at onclick forsøger at variere attribut'en, når den allerede står der..
Så billederne skal vel listes op i starten via et script a lá:
<script language="JavaScript" type="text/javascript">
img1src = new Image();
img1src.src = "button2.jpg";
img2src = new Image();
img2src.src = "button1.jpg";
, men hvordan bestemmes så, hvor på siden billedet skal være?
Har jeg fat i noget? Jeg prøver lige at poste hele index-filen, så ser du... (jeg krydser fingrer!)
----------------------------
<script language="javascript">
/*
Auto center window script- Eric King (
http://redrival.com/eak/index.shtml)
Permission granted to Dynamic Drive to feature script in archive
For full source, usage terms, and 100's more DHTML scripts, visit
http://dynamicdrive.com*/
var win = null;
function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings)
}
</script>
</head>
<body>
<div id="horizon">
<div id="content" align=""><font color="#808080">
<img src="../images/web-indhold.jpg" align="right" width="1000" height="341" alt="" border="0">
<div id="contact"><a href="mailto:ronni@rkwonline.com?subject=RKWonline.com >"><img src="../images/menu.gif" align="left" width="120" height="46" alt="Click here to contact" border=""></a></div>
<div id="menu">
<table width="100%" align="left" valign="top" border="0"><tr>
<tr><td height=""><a href="java script:;" onclick="document.getElementById('news').setAttribute('src','../images/news.jpg');toink.swapto(1)"><img src="../images/menu.gif" align="left" width="77" height="20" alt="news" border=""></a></td></tr>
<tr><td height=""><a href="java script:;" onclick="document.getElementById('projects').setAttribute('src','../images/projects.jpg');toink.swapto(2)"><img src="../images/menu.gif" align="left" width="77" height="20" alt="projects" border=""></a></td></tr>
<tr><td height=""><a href="java script:;" onclick="document.getElementById('percussion').setAttribute('src','../images/percussion.jpg');toink.swapto(3)"><img src="../images/menu.gif" align="left" width="162" height="20" alt="marimba & percussion" border="0"></a></td></tr>
<tr><td height=""><a href="java script:;" onclick="document.getElementById('piano').setAttribute('src','../images/piano.jpg');toink.swapto(4)"><img src="../images/menu.gif" align="left" width="77" height="20" alt="piano" border="0"></a></td></tr>
<tr><td height=""><a href="java script:;" onclick="document.getElementById('photo').setAttribute('src','../images/photo.jpg');toink.swapto(5)"><img src="../images/menu.gif" align="left" width="88" height="20" alt="photo" border="0"></a></td></tr>
<tr><td height=""><a href="java script:;" onclick="document.getElementById('press').setAttribute('src','../images/press.jpg');toink.swapto(6)"><img src="../images/menu.gif" align="left" width="85" height="20" alt="press material" border="0"></a></td></tr>
<tr><td height=""><a href="java script:;" onclick="document.getElementById('calendar').setAttribute('src','../images/calendar.jpg');toink.swapto(7)"><img src="../images/menu.gif" align="left" width="144" height="21" alt="calendar" border="0"></a></td></tr>
</table>
<div id="nav1"></div>
<div id="nav2"></div>
<div id="nav3"></div>
<div id="nav4"></div>
<div id="nav5"></div>
<div id="nav6"></div>
<div id="nav7"></div>
<div id="nav8"></div>
</div>
<div id="scrolltrack">
<div id="scrollbar"></div>
</div>
<div id="box">
<h2 id="header0">Welcome</h2>
<div id="container0" class="clcontainer">
<div id="content0" class="clcontent">
<br><br><br><img src="../images/velkomst-2.jpg" left="30" width="277" height="77" alt="" border="0" margin-left="30px"><br>
</div>
</div>
</div><div id="box1">
<h2 id="header1">News</h2>
<img id="news" src="../images/news.jpg" left="" width="339" height="76" alt="" border="0">
<div id="container1" class="clcontainer">
<div id="content1" class="clcontent">
<h3>nyhedsoverskrift</h3>
<p>bla bla bla</p>
<br><br>
</div>
</div>
</div><div id="box2">
<h2 id="header2">Projects</h2>
<img id="projects" src="../images/projects.jpg" left="" width="339" height="76" alt="" border="0">
<div id="container2" class="clcontainer">
<div id="content2" class="clcontent">
<h3>Projects</h3>
<p>bla bla bla</p>
<br><br>
</div>
</div>
</div><div id="box3">
<h2 id="header3">Marimba & Percussion</h2>
<img id="percussion" src="../images/percussion.jpg" left="" width="339" height="76" alt="" border="0">
<div id="container3" class="clcontainer">
<div id="content3" class="clcontent">
<h3>Marimba & Percussion</h3>
<p>bla bla bla</p>
<br><br>
</div>
</div>
</div><div id="box4">
<h2 id="header4">Piano</h2>
<img id="piano" src="../images/piano.jpg" left="" width="339" height="76" alt="" border="0">
<div id="container4" class="clcontainer">
<div id="content4" class="clcontent">
<h3>Piano</h3>
<p>bla bla bla</p>
<br><br>
</div>
</div>
</div><div id="box5">
<h2 id="header5">Photo</h2>
<img id="photo" src="../images/photo.jpg" left="" width="339" height="76" alt="" border="0">
<div id="container5" class="clcontainer">
<div id="content5" class="clcontent">
<h3>Photo</h3>
<p>bla bla bla</p>
<br><br>
</div>
</div>
</div><div id="box6">
<h2 id="header6">Pressmaterial</h2>
<img id="press" src="../images/press.jpg" left="" width="339" height="76" alt="" border="0">
<div id="container6" class="clcontainer">
<div id="content6" class="clcontent">
<h3>Press - Photos</h3>
<p>bla bla bla</p>
<br><br>
</div>
</div>
</div><div id="box7">
<h2 id="header7">Calendar</h2>
<img id="calendar" src="../images/calendar.jpg" left="" width="339" height="76" alt="" border="0">
<div id="container7" class="clcontainer">
<div id="content7" class="clcontent">
<h3>Calendar</h3>
<p>bla bla bla</p>
<br><br>
</div>
</div>
</div><div id="box8">
<h2 id="header8">empty</h2>
<div id="container8" class="clcontainer">
<div id="content8" class="clcontent">
</div>
</div>
</div>
<script src="
http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-2524767-1";
urchinTracker();
</script>
</body>
</html>