Menu
Hello,
Can I create an object which his name is the content of a variable.
I would make something like that :
[CODE]
function coord(X, Y, Date) {
this.X = X;
this.Y = Y;
this.Date = Date;
}
function Sav_pos(myObject) {
myObject.getAttribute(‘ID’) = new coord(event.x, event.y,Date_evenement);
…
alert(myObject.getAttribute(‘ID’).X)
alert(myObject.getAttribute(‘ID’).Y)
alert(myObject.getAttribute(‘ID’).Date)
}
Thank you