power-box.de
-


Hinweise


Antwort
 
LinkBack Themen-Optionen Thema durchsuchen Thema bewerten
Alt 16.10.2001, 01:41   #1
TP-Senior
 
Benutzerbild von Eckberta
 
Registriert seit: Sep 2001
Ort: GC-Land
Eckberta macht alles soweit korrekt

kurzer Text, wenn Maus auf Bild?


Hallo,

sicher gibt es dafür einen Fachausdruck, aber leider weiss ich den nicht und werde auch in der DW Hilfe nicht fündig.

Folgendes Problemchen: Gern möchte ich, dass beim Überfahren des Bildes bzw. des Buttons mit der Maus ein kurzer Erläuterungstext angezeigt wird.

Wie muss ich das machen?
Vielen Dank an Euch.
Gruss, EB.
__________________
www.dynamik-im-bild.de
Eckberta ist offline   Mit Zitat antworten


Alt 16.10.2001, 02:02   #2
TP-Greis
 
Benutzerbild von Boris
 
Registriert seit: Mar 2001
Ort: Berlin, Germany
Boris ist ein richtiges Arbeitstier - DANKEBoris ist ein richtiges Arbeitstier - DANKEBoris ist ein richtiges Arbeitstier - DANKEBoris ist ein richtiges Arbeitstier - DANKEBoris ist ein richtiges Arbeitstier - DANKEBoris ist ein richtiges Arbeitstier - DANKE
Du meinst warscheinlich die ALT-Texte ... sieht so aus:

<IMG SRC="dasbild.jpg" ALT="Hier steht die Beschreibung">

Im NN6.x und IE6.x kannst Du auch das neue TITLE-Tag benutzen (lt. HTML 4.01 Standard)

<IMG SRC="dasbild.jpg" TITLE="Hier steht die Beschreibung">

Am besten ist es, wenn Du beides benutzt - musst Du wissen
__________________
My software never has bugs. It just develops random features ...

» DevShack - die Website des freien Webentwicklers Boris
Boris ist offline   Mit Zitat antworten
Alt 16.10.2001, 14:20   #3
TP-Greis
 
Benutzerbild von Lars
 
Registriert seit: Jun 2001
Ort: Bonn-Altstadt
Lars bringt sich richtig ein

Re: kurzer Text, wenn Maus auf Bild?


Zitat:
Original geschrieben von Eckberta

... sicher gibt es dafür einen Fachausdruck* ...


* Tooltip
__________________
Give up yourself into the moment — The time is now.
Lars ist offline   Mit Zitat antworten
Alt 16.10.2001, 17:19   #4
TP-Senior
 
Benutzerbild von Eckberta
 
Registriert seit: Sep 2001
Ort: GC-Land
Eckberta macht alles soweit korrekt

D A N K E...


.... an Euch, werds ausprobieren.

Wenn noch ne Frage sein sollte, meld ich mich hier noch mal.

Bis denne, EB.
__________________
www.dynamik-im-bild.de
Eckberta ist offline   Mit Zitat antworten
Alt 16.10.2001, 18:00   #5
TP-Specialist
 
Benutzerbild von Flixxtoras
 
Registriert seit: May 2001
Ort: Leipzig
Flixxtoras macht alles soweit korrekt

..


Falls dir das noch nicht genügt kann man da noch mehr machen!
In den Head:

PHP-Code:
<style type="text/css">
a  {color:#000000; text-decoration:none; font-weight:500;}
a:hover  {color:#000000; text-decoration:underline; font-weight:500;}
body     {background-color:#ffffff;}
p,td     {font-family:verdana,arial,helvetica,sans-seriffont-size:13pxline-height:16pxcolor:#666666;}

#divTooltip {position:absolute; top:0px; width:175px; visibility:hidden; z-index:200; background-color:#f3f3f3; layer-background-color:#f3f3f3;}
.normalStyle    {padding:2pxtext-align:centerfont-weight:500width:175pxcolor:#000000; top:100px; font-family:verdana,arial,helvetica; font-size:11px; background-color:#f3f3f3; layer-background-color:#f3f3f3; border-width:1px; border-style:solid; border-color:#000000; cursor:default;}
.netscape4Style {padding:0pxfont-weight:500width:175pxcolor:#000000; top:100px; font-family:verdana,arial,helvetica; font-size:11px; background-color:#f3f3f3; layer-background-color:#f3f3f3; border:1px solid #000000;}  
</style>
<
script language="JavaScript" type="text/javascript">
function 
lib_bwcheck(){ //Browsercheck (needed)
    
this.ver=navigator.appVersion
    this
.agent=navigator.userAgent
    this
.dom=document.getElementById?1:0
    this
.opera5=(navigator.userAgent.indexOf("Opera")>-&& document.getElementById)?1:0
    this
.ie5=(this.ver.indexOf("MSIE 5")>-&& this.dom && !this.opera5)?1:0
    
this.ie6=(this.ver.indexOf("MSIE 6")>-&& this.dom && !this.opera5)?1:0;
    
this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
    
this.ie=this.ie4||this.ie5||this.ie6
    this
.mac=this.agent.indexOf("Mac")>-1
    this
.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0
    
this.ns4=(document.layers && !this.dom)?1:0;
    
this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5)
    return 
this
}
var 
bw=new lib_bwcheck()

// Variables to set:

messages= new Array()
// Write your descriptions in here.
messages[0]="Der 1. Test funktioniert"
messages[1]="Der 2. Test funktioniert"
messages[2]="Der 3. Test funktioniert'"
// To have more descriptions just add to the array.

fromX= -1           // How much from the actual mouse X should the description box appear?
fromY21           // How much from the actual mouse Y should the description box appear?
ns4center1        // Centering the text in ns4 doesn't work with css, use this variable instead... the value is 1 or 0
useFading0        // 1 for a fading effect in windows explorer 5+ and all platforms ns6, 0 for no fading effect.
animation1        // 1 if you want animation, 0 for no animation.
detectiontype0    // 1 for 'smooth' window size detection, 0 for 'flip' window size detection.
delay300          // The time before showing the popup, in milliseconds.


// A unit of measure that will be added when setting the position of a layer.
var px bw.ns4||window.opera?"":"px";

if(
document.layers){ //NS4 resize fix.
    
scrXinnerWidthscrYinnerHeight;
    
onresize= function(){if(scrX!= innerWidth || scrY!= innerHeight){history.go(0)} };
}

// object constructor...
function makeTooltip(obj){                                
       
this.elmdocument.getElementByIddocument.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?document.layers[obj]:0;
       
this.cssbw.ns4?this.elm:this.elm.style;
       
this.wrefbw.ns4?this.elm.document:this.elm;
    
this.objobj+'makeTooltip'; eval(this.obj+'=this');
    
this.wbw.ns4this.elm.clip.widththis.elm.offsetWidth;
    
this.hbw.ns4this.elm.clip.heightthis.elm.offsetHeight;
};
makeTooltip.prototype.measureIt= function(){
    
this.wbw.ns4this.elm.clip.widththis.elm.offsetWidth;
    
this.hbw.ns4this.elm.clip.heightthis.elm.offsetHeight;
};
makeTooltip.prototype.writeIt= function(text){
    if (
bw.ns4) {this.wref.write(text); this.wref.close()}
    else 
this.wref.innerHTMLtext;
};

// Mousemove detection
var mouseX=0,mouseY=0,setX=0,setY=0;
function 
getMousemove(e){
    
mouseX= (bw.ns4||bw.ns6)? e.pageXbw.ie&&bw.win&&!bw.ie4? (event.clientX-2)+document.body.scrollLeft event.clientX+document.body.scrollLeft;
    
mouseY= (bw.ns4||bw.ns6)? e.pageYbw.ie&&bw.win&&!bw.ie4? (event.clientY-2)+document.body.scrollTop event.clientY+document.body.scrollTop;
    if (
isLoaded && hovering && animationplaceIt();
};
function 
placeIt(){
    if (
detectiontype==1setXmouseX+fromX+tooltip.screenWscrolled screenWscrolled-tooltip.wmouseX+fromX;
    if (
detectiontype==1setYmouseY+fromY+tooltip.screenHscrolled screenHscrolled-tooltip.hmouseY+fromY;
    if (
detectiontype==0setXmouseX+fromX+tooltip.screenWscrolled mouseX-fromX-tooltip.wmouseX+fromX;
    if (
detectiontype==0setYmouseY+fromY+tooltip.screenHscrolled mouseY-fromY-tooltip.hmouseY+fromY;
    if (
setX<0setX0;
    if (
setY<0setY0;
    
tooltip.css.leftsetX+px;
    
tooltip.css.topsetY+px;
};

// Main popUp function.
var hovering=falsescreenWscrolled=0screenHscrolled=0;
makeTooltip.prototype.showTimernull;
function 
popUp(num){
    if(
isLoaded){
        
clearTimeout(tooltip.popTimer);
        
dopopOut();
        if (
bw.ns4){
            var 
text'<span class="netscape4Style">' + (ns4center?'<center>':"") + messages[num] + (ns4center?'</center>':"") + '</span>';
            
tooltip.writeIt(text);
        }
        if (!
bw.ns4tooltip.writeIt(messages[num]);
        
screenWscrolledscreenW + (bw.ie?document.body.scrollLeft:pageXOffset);
        
screenHscrolledscreenH + (bw.ie?document.body.scrollTop:pageYOffset);
        
hoveringtrue;
        
        
/* I'm using a timeout for ie4 here, because it doesn't store the measurements quickly enough. Does anybody know why this happens? */
        
if (bw.ie4setTimeout('tooltip.measureIt(); placeIt();'delay/2);
        else { 
tooltip.measureIt(); placeIt(); }
        if (
useFadingtooltip.showTimersetTimeout('tooltip.blendIn()'delay);
        if (!
useFadingtooltip.showTimersetTimeout('tooltip.css.visibility="visible"'delay);
    }
};

// Hiding routines
makeTooltip.prototype.popTimernull;
function 
popOut(){
    if (
isLoadedtooltip.popTimersetTimeout('dopopOut()'30)
};
function 
dopopOut(){
    
hoveringfalse;
    
clearTimeout(tooltip.showTimer);
    
tooltip.css.visibility'hidden';
    
clearTimeout(tooltip.fadeTimer);
    
tooltip.i0;
};

// Measure screensize.
var scrollbarWidthbw.ns6&&bw.win?14:bw.ns6&&!bw.win?16:bw.ns4?16:0;
function 
measureScreen() {
    
tooltip.css.top0+px;
    
tooltip.css.left0+px;
    
screenW= (bw.ie?document.body.clientWidth:innerWidth) - scrollbarWidth;
    
screenH= (bw.ie?document.body.clientHeight:innerHeight);
};

// Opacity methods.
makeTooltip.prototype.blendIn= function(){
    if (
bw.ie && bw.win && !bw.ie4) {
        
this.css.filter'blendTrans(duration=0.5)';
        
this.elm.filters.blendTrans.apply();
        
this.css.visibility'visible';
        
this.elm.filters.blendTrans.play();
    }
    else {
        
this.css.visibility'visible';
        if (!
bw.ns4this.fadeIt();
    }
};
makeTooltip.prototype.step8;
makeTooltip.prototype.i0;
makeTooltip.prototype.fadeTimernull;
makeTooltip.prototype.fadeIt= function(){
    
this.i+= this.step;
    
//this.css.filter= 'alpha(opacity='+this.i+')';
    
this.css.MozOpacitythis.i/100;
    if (
this.i<100this.fadeTimersetTimeout(this.obj+'.fadeIt()'40);
    else 
this.i0;
};

// Init function...
var isLoadedfalse;
function 
popupInit(){
    
//Fixing the browsercheck for opera... this can be removed if the browsercheck has been updated!!
    
bw.opera5 = (navigator.userAgent.indexOf("Opera")>-&& document.getElementById)?true:false
    
if (bw.opera5bw.ns6 0
    
    
//Extending the browsercheck to add windows platform detection.
    
bw.win= (navigator.userAgent.indexOf('Windows')>-1)

    
tooltip= new makeTooltip('divTooltip');
    
tooltip.elm.onmouseover= function(){ clearTimeout(tooltip.popTimer); if(bw.ns4){setTimeout('clearTimeout(tooltip.popTimer)',20)}; };
    
tooltip.elm.onmouseoutdopopOut;
    if (
bw.ns4document.captureEvents(Event.MOUSEMOVE);
    
document.onmousemovegetMousemove;
    
measureScreen();
    if (!
bw.ns4onresizemeasureScreen;
    if (!
bw.ns4tooltip.elm.className'normalStyle';
    if (
bw.ie && bw.win && !bw.ie4tooltip.css.filter'alpha(opacity=100)'//Preloads the windows filters.
    
isLoadedtrue;
};

// Initiates page on pageload if the browser is ok.
if(bw.bw && !isLoadedonloadpopupInit;
</script> 
In den Body:
PHP-Code:
<br>
<
br>
<
br>
<
br>
<
table width="370" cellpadding="1" cellspacing="0" border="0" bgcolor="#666666" align="center"><tr><td>
<
table width="100%" cellpadding="10" cellspacing="0" border="0" bgcolor="#f3f3f3"><tr><td>Das ist so ein ScriptProbiert es mal aus es läuft auf allen Plattformen und sogar beim NS 6/6.1<br>
<
br>
<
p align="right">
<
a href="#" onmouseover="popUp(0)" onmouseout="popOut()" onclick="useFading=useFading?0:1; return false;" onfocus="if(this.blur)this.blur()">Test 1</a><br>
<
a href="#" onmouseover="popUp(1)" onmouseout="popOut()" onclick="animation=animation?0:1; return false;" onfocus="if(this.blur)this.blur()">Test 2</a><br>
<
a href="#" onmouseover="popUp(2)" onmouseout="popOut()" onclick="detectiontype=detectiontype?0:1; return false;" onfocus="if(this.blur)this.blur()">Test 3</a></p>
</
td></tr></table>
</
td></tr></table>
<
div id="divTooltip"></div
Noch etwas der NS 6.0 kann keine alt
Texte Anzeigen das ist kein Fehler sondern Regelkonform den die Alttexte wie sie im IE sind sind eigentlich Linksinfo's. Der NS 6 stellt diese nur dann dar wenn die Bilder nich geladen werden konnten.
Flixxtoras ist offline   Mit Zitat antworten
Alt 16.10.2001, 20:01   #6
TP-Senior
 
Benutzerbild von Eckberta
 
Registriert seit: Sep 2001
Ort: GC-Land
Eckberta macht alles soweit korrekt
Puh...

da krieg ich ja weiche Knie.
Muss ich, zwecks probieren, dass alles in die Seite in den Body kopieren und warum ist das so umfangreich?

Danke und Gruss, EB.
__________________
www.dynamik-im-bild.de
Eckberta ist offline   Mit Zitat antworten
Alt 16.10.2001, 21:02   #7
TP-Special Mod