Thema: Probleme mit Tooltipps

Tach zusammen!<BR>ICh bin z.Zt an ner Website mit ner genzen Menge Hover-Bildern!<BR>So weit nischt besonderes :-))<BR>Was ich aber gerne hätte, ist, dass bei überfaren eines solchen buttons ein tooltipp hinter<BR>der maus hergezogen wird! Eben so lange, bis man das element wider verlässt!<BR>Um text an einen mauszeiger zu hängen hat Ti-sch mal was gepostet:<BR>Sein script sah so aus:<BR>  <BR>function init()<BR>{<BR>document.onmousemove=bild;<BR>}<P>function bild(e)<BR>{<BR>document.all.bild_hinter_maus.style.left=event.x+20;<BR>document.all.bild_hinter_maus.style.top=event.y;<BR>}<P>Das funzt so weit auch ganz gut!<BR>Nur kann man das ganze halt nicht auch meine >10 Hover's anwenden!<BR>Deshalb hab ich mal versucht das ganze so abzuändern, dass es variabel ist! Dabei rausgekommen<BR>ist folgendes:<P>function init(name)<BR>{<BR>document.on#mouse#move=bild(name);<BR>}<P>function bild(name)<BR>{<BR>document.getElementById(name).style.left=event.x+20;<BR>document.getElementById(name).style.top=event.y;<BR>}<P>nun könnte ich theoretisch via<P><img src="jpg.jpg" #on#mouse#over="init('der_div')"><P>den div-tag mit der id "der_div" an den mauszeiger hängen!<BR>Und später wieder ausblenden (visibility=hidden). Aber so weit kommts erst garnicht:<P>Wenn ich über das bild gehe kommt der Fehler:<P>Nicht implementiert (Zeile 20)<P>Zeile 20 entspricht bei mir --> document.#on#mouse#move=bild(name);<P>Irgendwie will das ganze nicht so, wie ichs will!<BR>Hat da jemand ne idee?<P>Danke schomal !<P>P.S.:<BR> Die # müsst ihr euch mal wegdenken  [img]images/icons/grin.gif" border="0[/img]

GPG key 2E1B4257

2

Re: Probleme mit Tooltipps

Hi!<P>Soweit ich weis funktioniert das ganz einfach mit <P>title="hier der hint-text"<P>ich habe aber keine ahnung, in welchen tags das erlaubt ist.

When echoes fall on twisted night
When shadows burn by firelight
When mountains roar infernal rage
The blade shall flee its holy cage
http://pcorner.saxen.net

3

Re: Probleme mit Tooltipps

<BLOCKQUOTE><font size="1" face="Verdana, Helvetica, sans-serif">Zitat:</font><HR>Original erstellt von Kei:<BR><B><BR>title="hier der hint-text"<P></B><HR></BLOCKQUOTE><P>Das ist aber nicht genau das, was ich so meine!<BR>Sondern dieser entsprechende Div tag soll dan auch am mauszeiger "kleben" bleiben und mit ihm mitwandern, bis man wieder außerhelb des bildes ist!

GPG key 2E1B4257

4

Re: Probleme mit Tooltipps

nimm mal das:<P><html><head><title>MOUSEOVERTOOLTIP-IE5.5</title><BR><script language="JavaScript"><P>A=new Array("../images/flup.gif",<BR>"../images/links2000.gif",<BR>"../images/rechts2000.gif",<BR>"../images/5k1_Kopie.gif",<BR>"../images/CP224.gif",<BR>"../images/thinker.gif",<BR>"../images/valid-html401.gif",<BR>"../images/AN02542_.gif",<BR>"../images/denker.GIF");<P>B=new Array("1.tip","2.tip","3.tip","4.tip","5.tip","6.tip","7.tip","8.tip","9.tip")<P>function C()<BR>{for(i=0;i<9;i++){with(document.images[i]){src=A[i];width=55;height=69;}}}<P>function D(a)<BR>{with(document.getElementsByTagName("div")[0]){innerHTML=B[a];style.marginTop=event.clientY-70;style.marginLeft=event.clientX-10;style.backgroundColor="white";}}<P>function E()<BR>{document.getElementsByTagName("div")[0].innerHTML="";}<P></script><BR></head><BR><body bgColor=aa00bb onLOOT="C()" onMAUSover="E()"><BR><table border=0><BR><tr><BR><td onmousemove="D(0)"><img></td><BR><td width=26></td><BR><td onmousemove="D(1)"><img></td><BR><td width=26></td><BR><td onmousemove="D(2)"><img></td><BR><td width=26></td><BR><td onmousemove="D(3)"><img></td><BR><td width=26></td><BR><td onmousemove="D(4)"><img></td><BR><td width=26></td><BR><td onmousemove="D(5)"><img></td><BR><td width=26></td><BR><td onmousemove="D(6)"><img></td><BR><td width=26></td><BR><td onmousemove="D(7)"><img></td><BR><td width=26></td><BR><td onmousemove="D(8)"><img></td><BR></tr><BR></table><BR><div style="position:absolute"></div><BR></body></html><P>Eventhandler berischdschen......<P>gruß<P>matho<p>[ 16.04.2001: Beitrag editiert von: matho ]

5

Re: Probleme mit Tooltipps

Besten dank meister!<BR>Das funzt einwandfrei!<BR>Jetzt pass ichs nochn bissie an und es ist perfekt!<BR>  [img]images/icons/smile.gif" border="0[/img]   [img]images/icons/smile.gif" border="0[/img]   [img]images/icons/smile.gif" border="0[/img]   [img]images/icons/smile.gif" border="0[/img]

GPG key 2E1B4257

6

Re: Probleme mit Tooltipps

Ich danke für die Rückmeldung!<P>gruß<P>matho

7

Re: Probleme mit Tooltipps

Ach, nochwas, fiel mir erst später ein:<BR>Nochen Tick flexibler un auch wenscher Schreibarbeit ist das:<P><BR><html><head><title>MOUSEOVERTOOLTIP-IE5.5</title><BR><script language="JavaScript"><BR>document.onmousemove=J;d=document.images;z=document.getElementsByTagName("div");<P>A=new Array("../images/flup.gif",<BR>"../images/links2000.gif",<BR>"../images/rechts2000.gif",<BR>"../images/5k1_Kopie.gif",<BR>"../images/CP224.gif",<BR>"../images/thinker.gif",<BR>"../images/valid-html401.gif",<BR>"../images/AN02542_.gif",<BR>"../images/denker.GIF");<P>B=new Array("1.tip","2.tip","3.tip","4.tip","5.tip","6.tip","7.tip","8.tip","9.tip")<P>function C()<BR>{for(i=0;i<d.length;i++){with(d[i]){src=A[i];width=55;height=69;}}}<P>function E()<BR>{z[0].innerHTML="";}<P>function J(j)<BR>{T=j?j.target:window.event.srcElement;<BR>for(i=0;i<d.length;i++)<BR>{if(T==d[i])<BR>with(z[0]){innerHTML=B[i];style.marginTop=event.clientY-70;style.marginLeft=event.clientX-10;style.backgroundColor="ffffff";}}}<P></script><BR></head><BR><body bgColor=aa00bb onLOOT="C()" onMAUSover="E()"><BR><table border=0><BR><tr><BR><td><img></td><td width=26></td><BR><td><img></td><td width=26></td><BR><td><img></td><td width=26></td><BR><td><img></td><td width=26></td><BR><td><img></td><td width=26></td><BR><td><img></td><td width=26></td><BR><td><img></td><td width=26></td><BR><td><img></td><td width=26></td><BR><td><img></td><BR></tr></table><BR><div style="position:absolute"></div><BR></body></html><P>gruß und jute Nachd<P>matho<P>Die Eventhandler ändern......schnarch