PHP:
button1:
<body onLoad="MM_preloadImages('upak.gif')"><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image1','','upak.gif',1)"><img src="up.gif" name="Image1" width="28" height="28" border="0"></a>
butto2 :
<a href="#" onMouseover="moveup()" onMouseout="clearTimeout(moveupvar)"><img src="up.gif" border=0></a>
ich habe hier ein problem,.. ich wollte zwei mous over efeckte kombinieren das eine iss halt bei mous over scroll up und der zweite iss halt nur en bildwechseln, aber irgendwie gehts nicht :-(
hatte es ja so versucht
PHP:
<a href="#" onMouseover="moveup()" onMouseout="clearTimeout(moveupvar)"onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image1','','upak.gif',1)"><img src="up.gif" name="Image1" width="28" height="28" border="0"></a>
danke schonmal
edit: ach ja so wie sie oben stehen funktionieren beide, also getrennt
so um es besser zu erklären hier mal das ganze script iss halt ne div die über 2 buttons rauf bzw runter gescrollt wird. nur sollen halt diese beiden buttons "eingedrückt werden bei mous over
HTML:
<script type="text/javascript">
/******************************************
* Scrollable content script II- © Dynamic Drive (www.dynamicdrive.com)
* Visit https://www.dynamicdrive.com/ for full source code
* This notice must stay intact for use
******************************************/
iens6=document.all||document.getElementById
ns4=document.layers
//specify speed of scroll (greater=faster)
var speed=5
if (iens6){
document.write('<div id="container" style="position:relative;width:400px;height:295px;border:0px solid black;overflow:hidden">')
document.write('<div id="content" style="position:absolute;width:400px;left:0;top:0">')
}
</script><style type="text/css">
<!--
body {
background-image:url(index_r3_c3.jpg);
background-repeat:no-repeat;
background-attachment:fixed;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
body,td,th {
font-family: Tahoma;
font-size: x-small;
color: #000000;
font-weight: bold;
}
.Stil4 {color: #000000; }
-->
</style>
<ilayer name="nscontainer" width=400 height=295 clip="0,0,175,160">
<layer name="nscontent" width=400 height=295 visibility=hidden>
<center>
<center>
<!--INSERT CONTENT HERE-->
<!--END CONTENT-->
</p>
</center>
</layer>
</ilayer>
<script language="JavaScript1.2">
if (iens6)
document.write('</div></div>')
</script>
<table width="100%"><td><p align="center">
<a href="#" onMouseover="moveup()" onMouseout="clearTimeout(moveupvar)"><img src="up.gif" border=0></a>up <a href="#" onMouseover="movedown()" onMouseout="clearTimeout(movedownvar)"><img src="do.gif" border=0></a>down</p></td>
</table>
<script language="JavaScript1.2">
if (iens6){
var crossobj=document.getElementById? document.getElementById("content") : document.all.content
var contentheight=crossobj.offsetHeight
}
else if (ns4){
var crossobj=document.nscontainer.document.nscontent
var contentheight=crossobj.clip.height
}
function movedown(){
if (iens6&&parseInt(crossobj.style.top)>=(contentheight*(-1)+100))
crossobj.style.top=parseInt(crossobj.style.top)-speed+"px"
else if (ns4&&crossobj.top>=(contentheight*(-1)+100))
crossobj.top-=speed
movedownvar=setTimeout("movedown()",20)
}
function moveup(){
if (iens6&&parseInt(crossobj.style.top)<=0)
crossobj.style.top=parseInt(crossobj.style.top)+speed+"px"
else if (ns4&&crossobj.top<=0)
crossobj.top+=speed
moveupvar=setTimeout("moveup()",20)
}
function getcontent_height(){
if (iens6)
contentheight=crossobj.offsetHeight
else if (ns4)
document.nscontainer.document.nscontent.visibility="show"
}
window.onload=getcontent_height
</script>
</body>
</html>
hoch halt mit up.gif und bei aktiv dann upakt.gif
und down halt des gleiche,. nur ich kriegs nich da rein
Zuletzt bearbeitet: