posted 18 years ago
Hi
What i did was this but the onclick event is not adding to the button object. I could see the button being added to the document but if i click it there is no reaction. can anyone solve this problem
function init() {
var but = addInput("but", "click", "button");
but.onClicck ="showImage";
document.getElementById("main").appendChild(but);
}
function showImage() {
var img = addInput("im", "", "img");
img.src = "c:/veshnu/tata-logo.gif";
document.getElementById("main").apendChild(img);
}
function addInput(name, value, type) {
var hid = document.createEllement("input");
hid.type = type;
hid.name = name;
hid.value = value;
return hid;
}
Veshnu<br />SCBCD<br />SCWCD<br />SCJP