Hi everyone;
I am trying to attachEvent to a button so when you click on the button it is handled by my function doSomething(). Everything else works except the button when I click it - it does nothing. Any suggestions?
var mycurrent = top.frames['bottomFrame'].document.createElement("td");
var butt = top.frames['bottomFrame'].document.createElement("BUTTON");
butt.setAttribute('id', 'test');
butt.setAttribute('type','button');
butt.setAttribute('value','X');
mycurrent.appendChild(butt);
butt.attachEvent('onclick',doSomething);
mycurrent_row.appendChild(mycurrent);
// appends the row <tr> into <tbody>
mytablebody.appendChild(mycurrent_row);
I am trying to attachEvent to a button so when you click on the button it is handled by my function doSomething(). Everything else works except the button when I click it - it does nothing. Any suggestions?
var mycurrent = top.frames['bottomFrame'].document.createElement("td");
var butt = top.frames['bottomFrame'].document.createElement("BUTTON");
butt.setAttribute('id', 'test');
butt.setAttribute('type','button');
butt.setAttribute('value','X');
mycurrent.appendChild(butt);
butt.attachEvent('onclick',doSomething);
mycurrent_row.appendChild(mycurrent);
// appends the row <tr> into <tbody>
mytablebody.appendChild(mycurrent_row);