Hallo,
ich habe ein kleines Problem (vielleicht ist es sehr lächerlich, aber ich bin erst Anfänger)
hier ist alles ok:
function changeIt(){
if (!ok)
return
cross_el.innerHTML='<input type="image" src="images/marzi.gif" onmouseDown="moveIt();" onmouseOver="moveIt()">'
}
jedoch hier verschwindet der button .. könnt ihr mir hhelfen, wenn man das button anklickt, soll man auf list.php weiterkommen. ich bitte euch das script entsprechend umzuändern
function changeIt(){
if (!ok)
return
cross_el.innerHTML='<input type="image" src="images/marzi.gif" onmouseDown="moveIt();" onmouseOver="moveIt()" onclick="document.location.href='list.php';">'
}
Danke im Voraus.
Falls benötigt: hier der komplette code:
<script>
var fntcol="black"
var ok=(document.getElementById||document.all)?1:0
if (ok)
var cross_el=document.getElementById? document.getElementById("button1"):button1
/* Type your TEXT message below but DO NOT use double quotation marks, use
SINGLE quotation marks instead */
// No need to edit below this line
function changeIt(){
if (!ok)
return
cross_el.innerHTML='<input type="image" src="images/marzi.gif" onmouseDown="moveIt();" onmouseOver="moveIt()">'
}
function setRandom(){
random1=Math.floor(Math.random()*100)/*ideal:301*/
random2=Math.floor(Math.random()*100)/*ideal:401*/
}
function moveIt(){
if (!ok)
return
setRandom()
cross_el.style.top=random1
cross_el.style.left=random2
if (document.all){
if (cross_el.offsetTop-document.body.scrollTop>document.body.clientHeight)
cross_el.style.top=random1*(-2/3)
}
else{
if (cross_el.offsetTop-window.pageYOffset>window.innerHeight)
cross_el.style.top=random1*(-2/3)
}
}
</script>