You may want to modify the return value for the event handler. By assigning a new value to this property, the returnValue property of the event handler will be modified.
Because event handlers can only return a Boolean value, you only need to consider the possibility of changing the default true value to false.
If you return a true value, the event is handed back into the browser and it is able to continue handling the user interaction. For example, if a onClick handler is introduced, it would behave as if the onClick handler were not present.
Returning a false value informs the browser that your handler has done everything that is necessary to manage the event and it can now dispose of the event without any further action being taken on its part.
Prev | Home | Next |
Event.repeat | Up | Event.screenX |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |