topmenu, problem med div tags og indhold i dem.
HejJeg har et problem med at indsætte tables,tr og td´s i mine div tags.. jeg har vedhæftet en kode til test - jeg ville gerne have en multiline div-tag hvor alt efter hvad jeg klikker på i menuen, hopper til den givende adresse - problemet er bare at det ser ud til at man ikke kan have andre tags i div´en end <br>
-------
<html>
<head>
<script>
function test(id)
{
eval("document.all.floatLayer"+id+".style.display = 'none'")
}
function testen(id,elementnavn)
{
if (id == 1)
{
document.all.floatLayer1.style.display = 'block';
document.all.floatLayer2.style.display = 'none';
document.all.floatLayer3.style.display = 'none';
}
if (id == 2)
{
document.all.floatLayer1.style.display = 'none';
document.all.floatLayer2.style.display = 'block';
document.all.floatLayer3.style.display = 'none';
}
if (id == 3)
{
document.all.floatLayer1.style.display = 'none';
document.all.floatLayer2.style.display = 'none';
document.all.floatLayer3.style.display = 'block';
}
}
function testen2(id)
{
}
</script>
</HEAD>
<BODY>
<DIV id="floatLayer1" style="cursor:hand;display:none;position: absolute; width:200px; left:100px; top:20px;z-index: 100" onmouseout="test(1);"><span style="color:green"><a href="http://www.google.com">hsajdasjhd</a><br><a href="http://www.google.com">hsajdasjhd</a><br><a href="http://www.google.com">hsajdasjhd</a></span></DIV>
<DIV id="floatLayer2" style="cursor:hand;display:none;position: absolute; width:200px; left:100px; top:40px;z-index: 100" onmouseout="test(2);">test<br>test2</DIV>
<DIV id="floatLayer3" style="cursor:hand;display:none;position: absolute; width:200px; left:100px; top:60px;z-index: 100" onmouseout="test(3);"><table><tr><td>punkt1</td><td>punkt2</td><td>punkt3</td></tr></table></DIV>
<table>
<tr><td style="cursor:hand;" onmouseover="testen('1',this)" onmouseout="testen2('1')">test1</td></tr>
<tr><td style="cursor:hand;" onmouseover="testen('2',this)" onmouseout="testen2('2')">test2</td></tr>
<tr><td style="cursor:hand;" onmouseover="testen('3',this)" onmouseout="testen2('3')">test3</td></tr>
</table>
Jeg tror man vil kunne se problemet når man kører koden.. den kan ikke rigtigt finde ud af om den stadig er i div tag´en eller ej når man putter flere elementer ind i den. håber der er en der har et kvik løsning.. :)
