tags:

views:

50

answers:

3

Hi all:

Assume I get a table element with ID="emTab", how do I call JS to click it?

Thanks.

+1  A: 
rahul
Hi, I want to use JS to trigger a click event, not the handler.
Ricky
document.getElementById("emTab").click();.. does it works in FF??
Shoaib Shaikh
A: 

its simple using JQuery $('#emTab').click(functionToCall);

while in JS document.getElementById('emTab').onclick = function() {};

for details on DOM events: http://www.howtocreate.co.uk/tutorials/javascript/domevents

Shoaib Shaikh
+1  A: 

Firing events cross-browser - http://jehiah.cz/archive/firing-javascript-events-properly

Jonathan