These forums are currently read-only due to receiving more spam than actual discussion. Sorry.

It is currently Sat Dec 02, 2017 4:21 pm Advanced search

Click & Hold to Confirm

Here you can discuss things related to HTML and the Web in general that do not fit in to other categories.

Click & Hold to Confirm

Postby usernumberone » Thu Nov 04, 2010 2:15 pm

Hey Everyone,

First time poster here. Not sure if this is the correct forum maybe I should be posting in a Javascript forum. Please do let me know.

I haven't done any front end development in some time, I am more in the strategy side of things now but I have question about the capabilities of HTML5, AJAX and was wondering if anyone is willing to answer them and if possible work on it with me.

I have been thinking about a Click & Hold to confirm system for web forms and applications. There is more information at my blog post found here.

There is a flash prototype of the button I created. Take a look so you know what I am talking about.


Couple of questions:

1. Is this something HTML5 or AJAX is even capable of? I suspect the use of Javascript to create a timer and capture the state of the button, mousedown, mouserelease?

2. The animation would need to go in reverse and forward I suspect is possible with Javascript as well?


What are you thoughts on this system? What issues and benefits do you see?


If anyone is interested creating a prototype in HTML5/AJAX. I am willing to paypal some funds. I don't plan to use it in production on any website. Just present it on my blog as something that is possible in with HTML5 or AJAX.
usernumberone
<h6>
 
Posts: 2
Joined: Thu Nov 04, 2010 1:58 pm

Postby JAB Creations » Fri Nov 05, 2010 2:06 am

onclick is a JavaScript event, counting how long the mouse button is active is also a JavaScript event. This has nothing to do with HTML as far as I can see.
User avatar
JAB Creations
<aside>
 
Posts: 566
Joined: Tue Mar 13, 2007 4:48 am
Location: Sarasota Florida, USA

Postby zcorpan » Fri Nov 05, 2010 10:08 am

You'd listen for mousedown and mouseup and to make a nice animation you would probably use setInterval to increase the confirmation bar, and decrease it again on mouseup. However for device independence you'd also need to make it focusable (with tabindex=0) and listen for keydown and keyup (maybe space or enter?) or have an alternative way altogether to confirm.

So yeah, it's certainly possible.
zcorpan
<article>
 
Posts: 807
Joined: Tue Feb 06, 2007 8:29 pm
Location: Sweden

Postby usernumberone » Fri Nov 05, 2010 1:54 pm

Thanks for posting!

Yes, I thought it would rely heavily on Javascript but I also thought there may be some new feature inn HTML5 and/or CSS3 that could help with the requests or animation.

I would still like to make a working prototype of this, please do let me know if anyone is interested helping. I could paypal some funds for the work.

Thanks!
usernumberone
<h6>
 
Posts: 2
Joined: Thu Nov 04, 2010 1:58 pm

Postby JAB Creations » Fri Nov 05, 2010 3:20 pm

I don't know about setInterval as I've never gotten it to work, setTimeout would probably do the trick. I'd set a global variable and have the onclick and onmouseup events change the global variable's number to 0 or 1. If after the setTimeout for say five seconds occurs and the global variable is set to 1 (as in there was no onmouseup event so the button is still being held) then trigger the event such as a function. That's how I would approach it conceptually.
User avatar
JAB Creations
<aside>
 
Posts: 566
Joined: Tue Mar 13, 2007 4:48 am
Location: Sarasota Florida, USA


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 0 guests