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

George Tsang tsang at interlog.com
Thu Sep 12 21:31:25 CDT 2002


Thanks Harry.
 
It worked for me too. 
 
Can you tell me why it worked when we use the <input> tag and not the
<button> tag.
 
George
 
 
   Message: 3
   Date: Wed, 11 Sep 2002 14:44:30 -0700
   From: "Harry Love" <hlove at u.washington.edu>
Subject: RE: RE: Invoke onclick event of one button from clicking a
second button
 
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
 
_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
https://lists.LaTech.edu/mailman/listinfo/javascript
 
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20020912/285e9a35/attachment.htm>


More information about the Javascript mailing list