udskiftning af element i div tag via. javascript?
Jeg er ved at oprette en hjemmeside i CMS.Jeg har brug for et javascript, der ved onclick på en button kan skifte nogle elementer ud, inden i et div tag med en bestemt id. (Elementerne er allerede defineret i systemet)
Altså ved onclick på en button skiftes elementet ud i denne div.
<div id="udskift"><% = Diasshow %></div>
Er der nogen som kan hjælpe mig lidt igang?
Jeg har sat min kode ind nedenunder:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<!-- top-nav -->
<HEAD>
<TITLE>
<% = pageTitlePrefix %>
<%= pageTitle %></TITLE>
<% if pageScriptArea <> "" then
response.write(pageScriptArea)
end if %>
<%= MetaTags %>
<% = css %>
<style type="text/css">
<!--
.scrolling{
scrollbar-3d-light-color: #404040;
scrollbar-arrow-color: #7a7a75;
scrollbar-base-color: #7a7a75;
scrollbar-dark-shadow-color: #404040;
scrollbar-face-color: #404040;
scrollbar-highlight-color: #242424;
scrollbar-shadow-color: #404040;
}
-->
</style>
</HEAD>
<body bgcolor="<%= BgColor %>" leftmargin="0" topmargin="0" <% = Events %>>
<table width="100%" height="100%" border="0">
<tr>
<td align="center" valign="middle"><table width="964" border="0" cellpadding="0" cellspacing="0" background="/graphics/bg_estate_bolig.gif">
<tr>
<td width="8" height="40"> </td>
<td align="left" valign="top">
<table width="949" height="36" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="918" height="12" align="right" valign="top"><img src="/graphics/spacer.gif" width="1" height="1"></td>
<td width="31" align="right" valign="top"><img src="/graphics/spacer.gif" width="1" height="1"></td>
</tr>
<tr>
<td height="18" align="right" valign="top"><div id="TopNav"><%= navigation %></div></td>
<td align="right" valign="top"><img src="/graphics/flag.gif" width="25" height="13"></td>
</tr>
</table></td>
</tr>
<tr>
<td height="553"> </td>
<td align="left" valign="top"><table width="948" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="29" height="70"> </td>
<td align="left" valign="top"><table width="902" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="902" height="29" align="right" valign="bottom"><%= Tilbageknap %></td>
</tr>
</table>
<table width="673" height="26" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="26" align="left" valign="bottom">
<% = Bynavn_sagsnummer %>
</td>
</tr>
</table></td>
</tr>
<tr>
<td> </td>
<td height="374" align="left" valign="top"><table height="367" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="673" rowspan="2" align="left" valign="top"><div id="udskift"><% = Diasshow %></div></td>
<td width="227" height="153" align="left" valign="top"><!-- paragraph start (516) -->
<a name="516_295"></a><table width="150" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="100%" align="left" valign="top"><span class="norm"><a href="sw465.asp" target="_top" ><img src="/graphics/button_diasshow.gif" width="129" height="17" border="0" hspace="0" vspace="0" border="0" alt="" /></a></span></td>
</tr>
<tr>
<td width="100%" align="left" valign="top"><span class="norm"><img src="/graphics/button_plantegning.gif" width="129" height="17" border="0" hspace="0" vspace="0" border="0" alt="" /></span></td>
</tr>
<tr>
<td width="100%" align="left" valign="top"><span class="norm"><img src="/graphics/button_kort.gif" width="129" height="17" border="0" hspace="0" vspace="0" border="0" alt="" /></span></td>
</tr>
<tr>
<td width="100%" align="left" valign="top"><span class="norm"><img src="/graphics/button_fremvisning.gif" width="129" height="17" border="0" hspace="0" vspace="0" border="0" alt="" /></span></td>
</tr>
<tr>
<td width="100%" align="left" valign="top"><span class="norm"><img src="/graphics/button_salgsbestilling.gif" width="129" height="17" border="0" hspace="0" vspace="0" border="0" alt="" /></span></td>
</tr>
<tr>
<td width="100%" align="left" valign="top"><span class="norm"><a target="content2" href="sw465.asp"><img src="/graphics/button_boligsag.gif" width="129" height="17" border="0" hspace="0" vspace="0" border="0" alt="" /></a></span></td>
</tr>
</table>
<!-- paragraph end (516)--></td>
</tr>
<tr>
<td align="left" valign="top"><div class="scrolling" style="height:198px; width:200px; overflow: auto padding: 0px 50px 0px 0px;" ><%= Tekst %></div></td>
</tr>
</table></td>
</tr>
<tr>
<td height="80"> </td>
<td align="left" valign="top"><%= Boligtabel %></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>