Hi, All the one can capture events on a global level (window, document and layer), it seems that you can only capture events that are defined for an element. After some research and utilizing "Javascript: The Complete Reference", the only objects that capture doubleclick are document, link, image, and button elements. SELECT events are: onChange, onMouseOver, onMouseOut, onBlur and onFocus. I have included an example from the above reference that illustrates all captured events, try it out it is very informative. Dave RTSC Inc. ______________________________________________________________________ From: "Mathew, Aby" <[EMAIL PROTECTED]>�| Block address To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>, "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]> Subject: Re: [ND] Javascript problem with Netscape Date: Fri, 18 Jun 1999 10:03:56 -0400 Hetal, Going by Netscapes documentation on Javascript (http://developer.netscape.com/docs/communicator/jsref/index.htm), I think the doubleClick event is captured only by the 'document' object. So my guess is that if you write a function myDblClickHandler() that checks for event.target = document.pgTest.listBox and then does document.pgTest.elements[1].click() and inside the <BODY ..> tag put "onDblClick=myDblClickHandler()" that should work. By putting an Alert(..) you can verify that the dblClick event is not being captured for the listbox. Aby > -----Original Message----- > From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]] > Sent: Friday, June 18, 1999 10:11 AM > To: [EMAIL PROTECTED] > Subject: [ND] Javascript problem with Netscape > > Hi, > Netscape does not support some elements of java script which even IE > does!! > > I have a button btA and a list box. I want to dynamically click the > button when > I double click an item in the list box. I have set the > ExtraHTMLText property of > the list box to onDblClick="document.pgTest.elements[1].click(); > return false;" > (element[1] corresponds to the btA) > > I have confirmed that Netscape IS ABLE to recognize > elements[1] as btA but still it just does not execute the > javascript code. The code works fine in IE. > > Trying to click button btA by clicking button btB using the above code > works fine in both IE and Netscape. > The code does not work only when I try to click btA by double clicking an > element in list box. > > Is there a work around for this problem. > > Thanks > HetalLink: This is a link
Image:
