Ich habe 2 fragen.
1) kennt jemand gute Seiten mit Tutorialen für DHTML?
2) Warum funzt dieser DHTML - Quellcode nicht?
<html>
<head><title>DHTML.SEITE.NET - Pull-Down-Menüs</title>
<script>
<!--
var old;
var memold;
if(document.layers)
{
window.captureEvents(Event.MOUSEDOWN);
window.onmousedown=do_out;
} else
{
document.onmousedown=do_out;
}
// hier wird immer wieder von problemen mit dem internet explorer berichtet, die ich mit meiner version nicht nachvollziehen kann - bei mir funktioniert obiger code!
// wer probleme hat: ins forum von http://dhtml.seite.net schauen oder folgendes probieren:
/*
if(document.layers)
{
window.captureEvents(Event.MOUSEUP);
window.onmouseup=do_out;
} else
{
document.onmouseup=do_out; // oder auch: document.onmouseclick=do_out
}
*/
function show_layer(x)
{
if(document.layers)
document.layers[x].visibility="show";
else
document.all[x].style.visibility="visible";
}
function hide_layer(x)
{
if(document.layers)
document.layers[x].visibility="hide";
else
document.all[x].style.visibility="hidden";
}
function do_menu(x)
{
if(!old)
old=memold;
if(old!=x)
{
show_layer(x);
old=x;
} else
old="";
}
function do_check(x)
{
if(old && old!=x)
{
hide_layer(old);
show_layer(x);
old=x;
}
}
function do_out()
{
if(old)
hide_layer(old);
memold=old;
old="";
}
// -->
</script>
<style>
.menu
{
position: absolute;
top:0;
z-index: 2;
}
.submenu
{
position: absolute;
top: 22;
z-index: 0;
visibility: hide;
visibility: hidden;
}
</style>
</head>
<body>
<div id="m1" class="menu" style="left: 5; z-index: 2">
<table bgcolor=#99CC00 cellspacing=0 cellpadding=2 border=1 width=115>
<tr><td><a href="javascript:do_menu('m1x')" onmouseover="do_check('m1x')"><b>Navigation</b></a>
</table>
</div>
<div id="m1x" class="submenu" style="left: 5; top:22; z-index: 0;">
<table bgcolor=#99CC00 cellspacing=0 cellpadding=2 border=1 width=115>
<tr><td>
<a href="http://www.8ung.at/huj/home">home</a><br>
<a href="http://www.8ung.at/huj/about me.html">Über mich</a><br>
<a href="http://www.8ung.at/huj/stadt.html">Meine Stadt</a><br>
<a href="http://www.8ung.at/huj/chat.html">Der Chat</a><br>
<a href="http://www.8ung.at/huj/impressum.html">Das Impressum</a><br>
</table>
</div>
<div id="m2" class="menu" style="left: 120;">
<table bgcolor=#99CC00 cellspacing=0 cellpadding=2 border=1 width=100>
<tr><td><a href="javascript:do_menu('m2x')" onmouseover="do_check('m2x')"><b>"Service"</b></a>
</table>
</div>
<div id="m2x" class="submenu" style="left: 120; top:22; z-index: 0;">
<table bgcolor=#99CC00 cellspacing=0 cellpadding=2 border=1 width=100>
<tr><td>
<a href="http://287480.guestbook.onetwomax.de/">Mein Gästebuch</a><br>
<a href="http://7957.forum.onetwomax.de">Das Forum</a><br>
<a href="http://www.8ung.at/huj/tetris2.htm">Spiele</a>
</table>
</div>
<br><br>
</body>
</html>
Die Links sind welche die zu meiner Homepage http://www.huj******** gehören. (schleichwerbung 1)
Jedenfalls wenn man auf den Link im Menü klickt verschwindet zwar das Menü aber es öffnet sich keine Neue Seite. Ihr könnt das ja auf meiner homepage (http://www.huj********) (schleichwerbung 2) mal ausprobieren.
1) kennt jemand gute Seiten mit Tutorialen für DHTML?
2) Warum funzt dieser DHTML - Quellcode nicht?
<html>
<head><title>DHTML.SEITE.NET - Pull-Down-Menüs</title>
<script>
<!--
var old;
var memold;
if(document.layers)
{
window.captureEvents(Event.MOUSEDOWN);
window.onmousedown=do_out;
} else
{
document.onmousedown=do_out;
}
// hier wird immer wieder von problemen mit dem internet explorer berichtet, die ich mit meiner version nicht nachvollziehen kann - bei mir funktioniert obiger code!
// wer probleme hat: ins forum von http://dhtml.seite.net schauen oder folgendes probieren:
/*
if(document.layers)
{
window.captureEvents(Event.MOUSEUP);
window.onmouseup=do_out;
} else
{
document.onmouseup=do_out; // oder auch: document.onmouseclick=do_out
}
*/
function show_layer(x)
{
if(document.layers)
document.layers[x].visibility="show";
else
document.all[x].style.visibility="visible";
}
function hide_layer(x)
{
if(document.layers)
document.layers[x].visibility="hide";
else
document.all[x].style.visibility="hidden";
}
function do_menu(x)
{
if(!old)
old=memold;
if(old!=x)
{
show_layer(x);
old=x;
} else
old="";
}
function do_check(x)
{
if(old && old!=x)
{
hide_layer(old);
show_layer(x);
old=x;
}
}
function do_out()
{
if(old)
hide_layer(old);
memold=old;
old="";
}
// -->
</script>
<style>
.menu
{
position: absolute;
top:0;
z-index: 2;
}
.submenu
{
position: absolute;
top: 22;
z-index: 0;
visibility: hide;
visibility: hidden;
}
</style>
</head>
<body>
<div id="m1" class="menu" style="left: 5; z-index: 2">
<table bgcolor=#99CC00 cellspacing=0 cellpadding=2 border=1 width=115>
<tr><td><a href="javascript:do_menu('m1x')" onmouseover="do_check('m1x')"><b>Navigation</b></a>
</table>
</div>
<div id="m1x" class="submenu" style="left: 5; top:22; z-index: 0;">
<table bgcolor=#99CC00 cellspacing=0 cellpadding=2 border=1 width=115>
<tr><td>
<a href="http://www.8ung.at/huj/home">home</a><br>
<a href="http://www.8ung.at/huj/about me.html">Über mich</a><br>
<a href="http://www.8ung.at/huj/stadt.html">Meine Stadt</a><br>
<a href="http://www.8ung.at/huj/chat.html">Der Chat</a><br>
<a href="http://www.8ung.at/huj/impressum.html">Das Impressum</a><br>
</table>
</div>
<div id="m2" class="menu" style="left: 120;">
<table bgcolor=#99CC00 cellspacing=0 cellpadding=2 border=1 width=100>
<tr><td><a href="javascript:do_menu('m2x')" onmouseover="do_check('m2x')"><b>"Service"</b></a>
</table>
</div>
<div id="m2x" class="submenu" style="left: 120; top:22; z-index: 0;">
<table bgcolor=#99CC00 cellspacing=0 cellpadding=2 border=1 width=100>
<tr><td>
<a href="http://287480.guestbook.onetwomax.de/">Mein Gästebuch</a><br>
<a href="http://7957.forum.onetwomax.de">Das Forum</a><br>
<a href="http://www.8ung.at/huj/tetris2.htm">Spiele</a>
</table>
</div>
<br><br>
</body>
</html>
Die Links sind welche die zu meiner Homepage http://www.huj******** gehören. (schleichwerbung 1)
Jedenfalls wenn man auf den Link im Menü klickt verschwindet zwar das Menü aber es öffnet sich keine Neue Seite. Ihr könnt das ja auf meiner homepage (http://www.huj********) (schleichwerbung 2) mal ausprobieren.