Nov
21
Prototype Prevent Default
November 21, 2008 |
If you use Prototype JavaScript Framework’s event handling and try to use return false; to prevent default, it won’t work. The reason is that under Prototype, the return false no longer works, to make prevent default work, you must use Prototype build-in method: Event.stop. For instance:
Event.observe(link, 'click', popup, false);
function popup(e) {
//do popup
Event.stop(e);
}
Similar Posts
- None Found



































