Path:
Home
/
Home Page
/
Beispiele
/ Java-Script
Infobox:
In der Preview 1 des Netscape Navigators 6 und in Opera 4 wird die Infobox zwar angezeigt, kann aber weder verschoben noch geschlossen werden.
Quelltext
<html> <head> <TITLE>Infobox</TITLE> <script language="JavaScript1.2"> //drag drop Fuktion für Netscape 4//// ///////////////////////////////// var dragswitch=0 var nsx var nsy var nstemp function drag_dropns(name){ temp=eval(name) temp.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP) temp.onmousedown=gons temp.onmousemove=dragns temp.onmouseup=stopns } function gons(e){ temp.captureEvents(Event.MOUSEMOVE) nsx=e.x nsy=e.y } function dragns(e){ if (dragswitch==1){ temp.moveBy(e.x-nsx,e.y-nsy) return false } } function stopns(){ temp.releaseEvents(Event.MOUSEMOVE) } //drag drop Funktion für Internet Explorer 4+//// ///////////////////////////////// var dragapproved=false function drag_dropie(){ if (dragapproved==true){ document.all.showimage.style.pixelLeft=tempx+event.clientX-iex document.all.showimage.style.pixelTop=tempy+event.clientY-iey return false } } function initializedragie(){ iex=event.clientX iey=event.clientY tempx=showimage.style.pixelLeft tempy=showimage.style.pixelTop dragapproved=true document.onmousemove=drag_dropie } if (document.all){ document.onmouseup=new Function("dragapproved=false") } ////drag drop Funktionen enden hier////// function hidebox(){ if (document.all) showimage.style.visibility="hidden" else if (document.layers) document.showimage.visibility="hide" } </script> </head> <body> <!-- Legen Sie hier Breite und Position der Box fest. --> <div id="showimage" style="position:absolute;width:250px;left:50;top:50"> <table border="0" width="250" bgcolor="#000080" cellspacing="0" cellpadding="2"> <tr> <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0" height="36"> <tr> <td onMousedown="initializedragie()" style="cursor:hand" width="100%"><ilayer width="100%"><layer width="100%" onMouseover="dragswitch=1;drag_dropns(showimage)" onMouseout="dragswitch=0"><font face="Verdana" color="#FFFFFF"><strong><small> <!-- Fügen Sie hier die Überschrift der Box ein --> Ihre Überschrift </small></strong></font></layer></ilayer></td> <td style="cursor:hand"><a href="#" onClick="hidebox();return false"> <!-- Grafik, die für den Fenster-Schließen-Link benötigt wird. Zur Zeit close.gif --> <img src="close.gif" width="16" height="14" border=0><br></a></td> </tr><tr> <td width="100%" bgcolor="#FFFFFF" style="padding:4px" colspan="2"> <!-- Fügen Sie hier den Inhalt der Box ein (HTML-Befehle möglich) --> Ihr Inhalt. Links und Grafiken können auch eingefügt werden. <!-- Ende Ihres Inhaltes --> </td> </tr> </table> </td> </tr> </table> </div> </body> </html>
Webmaster >>
bis0uhr@gmx.at
Deine Überschrift
Dein Inhalt. Links und Grafiken können auch eingefügt werden.