Ciao a tutti,
ho un problemino che non sono riuscito a risolvere perchè non me ne intendo abbastanza di JavaScript, che, però è molto utile in moltissime applicazioni nel web;
Il codice che vi sottopongo funziona benissimo su Internet Explorer, ma per nulla con FireFox, cosa che invece mi piacerebbe fare:
var temp = new Image();
var loc;
var gotit;
function checkit(){
if ((navigator.appName=="Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) return;
else alert("To play, you need MSIE 4 or greater");
}
function exch(){
if ((event.button == 1) && (event.srcElement.className == "drag")) {
if (gotit == 1) {
gotit = 0 ;
document.images[loc].src = document.images[event.srcElement.name].src ;
document.images[event.srcElement.name].src = temp.src ;
}
else {
gotit = 1 ;
loc = event.srcElement.name ;
temp.src = document.images[loc].src ;
}
}
}
document.onmousedown=exch
Ecco: c'è qualcuno che mi può aiutare??? GRAZIE IN ANTICIPO!!!

Rispondi quotando