onclick event for dynamic TD object 
Author Message
 onclick event for dynamic TD object
Say tableObj is a table object.
I create
           trObj = tableObj.insertRow();

and then create a TD object
           tdObj = trObj.insertCel();

I want to have an onclick evant inside the TD object. The problem is that the
outerHTML is read-only for TD, and innerHTML is read-opnly for TR
I tried insertAdjacentHTML("afterBegin", "<td onclick=alert('hello');></td>") and
it didn't work either.

Any help out there ??



Sat, 27 Sep 2003 02:26:19 GMT  
 onclick event for dynamic TD object
tdObj.onclick = function_name;

Regards,

--
------------------------------
Carlos Vtor de O. Barros
Web Developer

------------------------------



Say tableObj is a table object.
I create
           trObj = tableObj.insertRow();

and then create a TD object
           tdObj = trObj.insertCel();

I want to have an onclick evant inside the TD object. The problem is that
the
outerHTML is read-only for TD, and innerHTML is read-opnly for TR
I tried insertAdjacentHTML("afterBegin", "<td
onclick=alert('hello');></td>") and
it didn't work either.

Any help out there ??



Sat, 27 Sep 2003 03:03:36 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. onClick event in a TD>

2. Onclick event not firing on td element when added dynamically

3. OnClick event: "Object does not support property...

4. Cloned tbody object refuses to fire onclick event (addendum to previous post)

5. OnClick event: "Object does not support property...

6. Client Side Dynamic TD width based on Browser Type

7. fire keyboard events form an onclick page event

8. dynamic onclick using innerHTML vs el.attachEvent

9. Why <TD onclick=myfunction> event doesn't execute inside a <FORM>?

10. Looping <TD> objects

11. OnClick event not working properly

12. Problem in writing a text menu responding to onclick event

 

 
Powered by phpBB® Forum Software