...

View Full Version : how can I add event for the object using javascript?



Benjaminmca
11-19-2010, 09:56 AM
Hi,

I have created <ul> element using createElement() method, and then how can i add evens for the object in javascript.

When I use .click() its not working.. could you please help me

Thanks in advance....

Dormilich
11-19-2010, 11:51 AM
because you have to define the .click property (.click(); would execute that)

Dormilich
11-22-2010, 06:49 AM
what exactly is not working? are there any error messages in the error console?

Kor
11-22-2010, 12:25 PM
If you need to create and add the onclick event:


element.onclick=function(){// statements, functions, etc... }



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum