Link to home
Start Free TrialLog in
Avatar of netformx
netformx

asked on

How to fire onClick client event of a hidden button from the code?

Hi,

I need in window.onload function to fire onClick event of the hidden button.
How to do this?
ASKER CERTIFIED SOLUTION
Avatar of Batalf
Batalf
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Zvonko
Or more generic:
<body onLoad="document.forms[0].myBtn.click()">
<form>
<input type=submit name="myBtn" style="display:none">
</form>
</body>

Uhps, sorry. My example initiates an infinite loop. Be warned :)