Bonjour à tous,
Pour une de mes pages d'un site en php, j'ai intégré un script dhtml
pris ici : http://www.dhteumeuleu.com/ (cliquer sur "les scripts"
dans menu du bas puis rechercher le script s'appelant Hector.html).
Après avoir modifié quelques paramètres dont l'image ;-) il ne me reste
plus qu'à rendre cliquable cette image pour qu'on puisse, onclick,
télécharger un fichier.
Or, ni la balise a href ni url dans le style d'image ne sont
actifs.....j'ai donc besoin d'aide juste pour rendre cliquable cette
image.
Merci d'avance à ceux qui vont regarder mon problème.
ps : code source
<HEAD>
<title>Hector - Interactive DHTML art-demos</title>
<meta name="Author" content="Gerard Ferrandez at http://www.dhteumeuleu.com">
<meta http-equiv="imagetoolbar" content="no">
<style type="text/css">
body {cursor:crosshair;margin:0; padding:0; position:absolute; overflow:hidden; background:#000; left:0; top:0; width:100%; height:100%;zIndex:-2;}
img {position:absolute; left:-10000;}
span {position:absolute; overflow:hidden;left:-1000;font-size:1px;}
</style>
<script type="text/javascript"><!--
// ======================================================
// Script by Gerard Ferrandez - Ge-1-doot - Dec 2001
// news://news.leibowitz.org/nzn.fr.html
// http://www.dhteumeuleu.com
// ======================================================
window.onerror = new Function("return true");
document.onselectstart = new Function("return false");
screen.bufferDepth = 16;
var xm = 0;
var ym = 0;
function CObj(N,parent){
this.S=(N+1)*P;
var o = document.createElement("span");
o.style.width = this.S;
o.style.height = this.S;
o.style.zIndex = 10000-N;
document.body.appendChild(o);
var i = document.createElement("img");
i.src = MP.src;
i.style.left = -(MP.width/2-this.S/2);
i.style.top = -(MP.height/2-this.S/2);
o.appendChild(i);
this.S = this.S * 0.5;
this.spa = o.style;
this.ddx = 0;
this.ddy = 0;
this.PX = xm;
this.PY = ym;
this.x = 0;
this.y = 0;
this.parent = parent;
this.anim = function (){
with (this) {
x0 = (parent)?parent.x:xm+Math.random()*6-3;
y0 = (parent)?parent.y:ym+Math.random()*6-3;
ddx = (x0-PX) * 0.5;
ddy = (y0-PY) * 0.5;
x = PX+=ddx;
y = PY+=ddy;
spa.left = x - S;
spa.top = y - S;
if(O)O.anim();
}
}
this.O = null;
if(N<NBi)this.O = new CObj(N+1,this);
}
function run(){
O.anim();
setTimeout("run();", 16);
}
onload = function() {
MP = document.getElementById("hector");
xm = document.body.offsetWidth/2;
ym = document.body.offsetHeight/2;
document.onmousemove = function(e){
if (window.event) e = window.event;
xm = (e.x || e.clientX);
ym = (e.y || e.clientY);
}
N = 0;
NBi = 60;
P=Math.max(MP.width,MP.height)/NBi;
O = new CObj(0);
run();
}
//-->
</script>
</head>
<body>
<IMG id="hector" src="ZB-otus.jpg">