i need to simulated having clicked on a link with JavaScript. As you will see in my stripped down example the resulting function from the click is a window.addEvent() action. Thanks for the help.
js code -html code -Code:window.addEvent('domready', function() { expandCollapse(); } function expandCollapse(){ $('expand').addEvent('click', function(){ // do something } }i have tried this but id didnt work -Code:<a id="expand" href="javascript:void(0);">open all</a>What is the code to make the window.addEvent() fire? *expand* must be part of it. Thank you.Code:document.getElementById('expand').click();


Reply With Quote
Bookmarks