cleary1981
Programmer
Can anyone help me I need to be able to delete a specified object. Heres the function I used to create the object.
Code:
function showObject (){
if (request.readyState == 4) {
var returned = request.responseText;
var splitResult = returned.split(" ");
var h = splitResult[0];
var w = splitResult[1]; // the dimensions must be set to a scale as they are to big for the screen. 25px represents 100mm
h = h/5;
w = w/5;
cv = document.getElementById("canvas");
newObject = document.createElement('div');
newObject.Class = g_objName;
newObject.id = "newObject";
newObject.innerHTML = g_objName;
newObject.alt = g_objName;
newObject.style.height = h;
newObject.style.width = w;
newObject.onmousedown=function(){grab(this);}
cv.appendChild(newObject);
}
}