Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] Avoid multiple onclick
- From: javascript at webdesignofficina.com (Guillaume)
- Subject: [Javascript] Avoid multiple onclick
- Date: Wed Oct 18 04:00:21 2006
Hi there,
I'm using onclick events to fire some functions. Such as:
var oncL2 = document.getElementById('shOptNav');
oncL2.onclick = function() {checkOptSliD(); clearMt()};
Trouble comes when a user clicks several times, the functions are fired
each time, added to each other...
This is an issue since I'm using some loops to check some elements
dimensions. These loops are then added into memory each time the onclick
event fires causing memory overload...
So what I'd like is the functions to fire only once even if onclick is
performed multiple times.
How do I do that ?
Thanks.
Guillaume
- Follow-Ups:
- [Javascript] Avoid multiple onclick
- From: Paul Novitski
- [Javascript] Avoid multiple onclick
- Prev by Date: [Javascript] [JavaScript ] keypress problem
- Next by Date: [Javascript] Avoid multiple onclick
- Previous by thread: [Javascript] [JavaScript ] keypress problem
- Next by thread: [Javascript] Avoid multiple onclick
- Index(es):