Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] Want to trap both click and double-click
- From: mdougherty at pbp.com (Mike Dougherty)
- Subject: [Javascript] Want to trap both click and double-click
- Date: Mon Dec 18 08:13:03 2006
Why not just use the click method to cycle through none|left|right ? Due to the way dblclick is handled (or not) I just don't use it at all If you really want a dblclick, I suggest writing your click method to detect if it has fired within the last X milliseconds- something like: click fired - set a timeout to call the single-click behavior click fired again - if there is a waiting timeout, cancel it and call the 2xclick behavior hmm... instead of all this fancy behavior, what about using some radio buttons? (or select?) On Sat, 16 Dec 2006 14:23:46 -0400 Miles Thompson <miles@xxxxxxxxxxxxxxxxx> wrote: >For turning advertisements on and off in my client's web site, and setting whether they appear on >the left, on the right or not at all I would like to use the following protocol > > onclick - function to check value, if "None" set it to "Left", else set it to "Left" > > ondblclick - function to set value for the date to "Right" > > The calendar is a two dimensional array of dates, first dimension is date value, second >dimension holds value associated with that date. > I plan that each displayed date will be an anchor with its ID being the date value. e.g. <A > href=(the javascript func) id=arrCalendar[1][4] > arrCalendar[1][4]</A> displays the date for >the second week, fifth day of the week. > > My problems is getting reliable detection of the single click or the double-click - anything >I've tried gives me one or the other. I really don't want to pop up a form to make the setting >changes. My users prefer to click directly on the date to change it. > > (Date colour changes and database update will be handled asynchonously) > > Does anyone have any suggestions? They would be most welcome. > > Thanks - Miles Thompson > > > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.1.409 / Virus Database: 268.15.21/589 - Release Date: 12/15/2006 > > > _______________________________________________ > Javascript mailing list > Javascript@xxxxxxxxxx > https://lists.LaTech.edu/mailman/listinfo/javascript
- Follow-Ups:
- [Javascript] Want to trap both click and double-click
- From: Miles Thompson
- [Javascript] Want to trap both click and double-click
- From: Paul Novitski
- [Javascript] Want to trap both click and double-click
- References:
- [Javascript] Want to trap both click and double-click
- From: Miles Thompson
- [Javascript] Want to trap both click and double-click
- Prev by Date: [Javascript] LaTeX to HTML in javascript
- Next by Date: [Javascript] Out of office ...
- Previous by thread: [Javascript] Want to trap both click and double-click
- Next by thread: [Javascript] Want to trap both click and double-click
- Index(es):