[Javascript] RE: Invoke onclick event of one button from clicking a second button

Harry Love hlove at u.washington.edu
Wed Sep 11 16:44:30 CDT 2002


George,
Try this:
<input type="button" id="abutton" value="A" onclick="alert('A clicked')"
/>
<input type="button" id="bbutton" value="B"
onclick="document.getElementById('abutton').click()" />

This worked for me in IE6, Moz1.1, and NN6.2.

Regards,
Harry




More information about the Javascript mailing list