View Single Post
Old 13-12-2008, 21:32   #4
Zak84
Senior Member
 
L'Avatar di Zak84
 
Iscritto dal: Dec 2001
Cittā: Fondi - LT -
Messaggi: 2990
Ho risolto.
In pratica la risposta al problema me l'ero giā data da solo dicendo che la setAttribute vuole una stringa...

La soluzione č questa:

Codice:
var x = 10;
var y = 10;
var z = 20;
var k = 20;
var coordinate = new String(x + "," + y + "," + z + "," + k);
var body = document.getElementById("body");

var mappa = document.createElement("map");
mappa.setAttribute("name", "map1");

var zona = document.createElement("area");
zona.setAttribute("shape", "rect");
zona.setAttribute("coords", coordinate);
zona.setAttribute("nohref", "true");
zona.setAttribute("onmouseover", "document.writeln('ciao')");
mappa.appendChild(zona);
body.appendChild(mappa);
Magari a qualcuno torna utile.


BYEZZZZZZZZZZ!!!!!!!!!!
__________________
Asus Prime X670E-PRO WIFI|AMD Ryzen 7 7800X3D|G.Skill Trident Z Neo 64GB DDR5 6000MHz CL30|nVidia GeForce RTX 4090 Founders Edition|Samsung 980 Pro 1TB|Samsung 980 Pro 2TB|Creative Sound BlasterX AE5-Plus| BeQuiet! Dark Power 13 850W|Noctua NH-D15S| BeQuiet! Silent Base 801
Zak84 č offline   Rispondi citando il messaggio o parte di esso