Sunday, May 19, 2024
65
rated 0 times [  71] [ 6]  / answers: 1 / hits: 15663  / 14 Years ago, tue, july 13, 2010, 12:00:00

how to trigger onmouseup handler from javascript



i have my button



<input id=x onmouseup=doStuff()>


and i want to trigger



document.getElementById(x).onmouseup();?????

More From » event-handling

 Answers
70

You've already answered your question :)



Simply call



document.getElementById(x).onmouseup()


in your code.



I've added an example here:



http://jsfiddle.net/cUCWn/2/


[#96252] Saturday, July 10, 2010, 14 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
rociom

Total Points: 287
Total Questions: 88
Total Answers: 101

Location: Oman
Member since Wed, Nov 17, 2021
3 Years ago
;