Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] RE: RE: Invoke onclick event of one button from clicking a second button
- From: javascript@xxxxxxxxxx (Harry Love)
- Subject: [Javascript] RE: RE: Invoke onclick event of one button from clicking a second button
- Date: Thu, 12 Sep 2002 20:46:23 -0700
<snip> 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 </snip> You're welcome. I couldn't figure that out either. According to the standards (and I believe Cutter brought this up, too), the click() method simulates a mouse click, but doesn't invoke the onclick event handler in most elements. However, in the HTMLInputElement specification, the click() method simulates a mouse click for an <input> whose type is "button," "checkbox," "radio," "reset," or "submit." I haven't read the entire specification, but it obviously invokes the onclick event handler for another element. However, why these two elements work in different ways is beyond my knowledge. Perhaps someone more experienced on the list could answer that? Regards, Harry
- References:
- Prev by Date: [Javascript] RE: RE: Invoke onclick event of one button from clicking a second button
- Next by Date: [Javascript] Validate date via Regular Expression
- Previous by thread: [Javascript] RE: RE: Invoke onclick event of one button from clicking a second button
- Next by thread: [Javascript] Validate date via Regular Expression
- Index(es):