FW: Feature Request: Pure JS Input Masks

classic Classic list List threaded Threaded
32 messages Options
12
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

FW: Feature Request: Pure JS Input Masks

David Lee Perish
FYI: Entered this as an enhancement request on the TRAC system: Ticket #1107
(enhancement), “Feature Request: Pure JS Input Masks”

________________________________________
From: David Lee Perish [mailto:[hidden email]]
Sent: Monday, July 10, 2006 10:06 AM
To: '[hidden email]'
Subject: Feature Request: Pure JS Input Masks

Greetings, any takers on the idea of creating a set of widgets/function(s)
to perform pure JS input masking on text fields/areas.  This would be a
very-nice-to-have tool in the dojo arsenal since IE7 breaks most of the HTC
behaviors which provide this functionality, while FF doesn’t support them at
all.  Some of the most popular uses would be for date/time, phone/fax,
currency, SS/tax-id and ip address fields.  When combined with the existing
validation routines, masks such as these would provide a very rich set of
common GUI-side tools that would make dojo a must have (or must have it even
more now) for many web-app developers.

Thanks,
-David Lee Perish



--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.10/383 - Release Date: 7/7/2006
 

_______________________________________________
Dojo FAQ: http://dojo.jot.com/FAQ
Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FW: Feature Request: Pure JS Input Masks

Bill Keese-2
Isn't this what the validation widgets already do?

David Lee Perish wrote:

> FYI: Entered this as an enhancement request on the TRAC system: Ticket #1107
> (enhancement), “Feature Request: Pure JS Input Masks”
>
> ________________________________________
> From: David Lee Perish [mailto:[hidden email]]
> Sent: Monday, July 10, 2006 10:06 AM
> To: '[hidden email]'
> Subject: Feature Request: Pure JS Input Masks
>
> Greetings, any takers on the idea of creating a set of widgets/function(s)
> to perform pure JS input masking on text fields/areas.  This would be a
> very-nice-to-have tool in the dojo arsenal since IE7 breaks most of the HTC
> behaviors which provide this functionality, while FF doesn’t support them at
> all.  Some of the most popular uses would be for date/time, phone/fax,
> currency, SS/tax-id and ip address fields.  When combined with the existing
> validation routines, masks such as these would provide a very rich set of
> common GUI-side tools that would make dojo a must have (or must have it even
> more now) for many web-app developers.
>
> Thanks,
> -David Lee Perish
>
>
>
_______________________________________________
Dojo FAQ: http://dojo.jot.com/FAQ
Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FW: Feature Request: Pure JS Input Masks

jessek
I think he means as you type literal UI masks. Ie if I say this input element is of format "(###) ###-####" then in my field after typing 4 numbers I should see:

"(123) 4"

So..It forces the (),- , and spacing masks on your input whether you like it or not. A useful feature I'd love to see as well. We have it in tacos but I think it's currently broken in the english locale. (go figure...)

On 7/10/06, Bill Keese <[hidden email]> wrote:
Isn't this what the validation widgets already do?

David Lee Perish wrote:

> FYI: Entered this as an enhancement request on the TRAC system: Ticket #1107
> (enhancement), "Feature Request: Pure JS Input Masks"
>
> ________________________________________
> From: David Lee Perish [mailto:[hidden email]]
> Sent: Monday, July 10, 2006 10:06 AM
> To: '[hidden email]'
> Subject: Feature Request: Pure JS Input Masks
>
> Greetings, any takers on the idea of creating a set of widgets/function(s)
> to perform pure JS input masking on text fields/areas.  This would be a
> very-nice-to-have tool in the dojo arsenal since IE7 breaks most of the HTC
> behaviors which provide this functionality, while FF doesn't support them at
> all.  Some of the most popular uses would be for date/time, phone/fax,
> currency, SS/tax-id and ip address fields.  When combined with the existing
> validation routines, masks such as these would provide a very rich set of
> common GUI-side tools that would make dojo a must have (or must have it even
> more now) for many web-app developers.
>
> Thanks,
> -David Lee Perish
>
>
>
_______________________________________________
Dojo FAQ: http://dojo.jot.com/FAQ
Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest



--
Jesse Kuhnert
Tacos/Tapestry, team member/developer

Open source based consulting work centered around dojo/tapestry/tacos/hivemind.
_______________________________________________
Dojo FAQ: http://dojo.jot.com/FAQ
Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FW: Feature Request: Pure JS Input Masks

Bill Keese-2
Jesse Kuhnert wrote:
> I think he means as you type literal UI masks. Ie if I say this input
> element is of format "(###) ###-####" then in my field after typing 4
> numbers I should see:
>
> "(123) 4"
>
> So..It forces the (),- , and spacing masks on your input whether you
> like it or not. A useful feature I'd love to see as well.

Ah, I see.

> We have it in
> tacos but I think it's currently broken in the english locale. (go
> figure...)

Maybe because it called "tacos".  I bet it works in spanish.
_______________________________________________
Dojo FAQ: http://dojo.jot.com/FAQ
Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FW: Feature Request: Pure JS Input Masks

jessek
Si :)

I think the developer that added it in is actually from Argentina (somewhere around there) .

On 7/10/06, Bill Keese <[hidden email]> wrote:
Jesse Kuhnert wrote:
> I think he means as you type literal UI masks. Ie if I say this input
> element is of format "(###) ###-####" then in my field after typing 4
> numbers I should see:
>
> "(123) 4"
>
> So..It forces the (),- , and spacing masks on your input whether you
> like it or not. A useful feature I'd love to see as well.

Ah, I see.

> We have it in
> tacos but I think it's currently broken in the english locale. (go
> figure...)

Maybe because it called "tacos".  I bet it works in spanish.
_______________________________________________
Dojo FAQ: http://dojo.jot.com/FAQ
Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest



--
Jesse Kuhnert
Tacos/Tapestry, team member/developer

Open source based consulting work centered around dojo/tapestry/tacos/hivemind.
_______________________________________________
Dojo FAQ: http://dojo.jot.com/FAQ
Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: FW: Feature Request: Pure JS Input Masks

David Lee Perish

Jesse is correct.  Here are a few similar examples done in pure JS:

 

http://javascript.internet.com/forms/format-date.html

 

http://javascript.internet.com/forms/dfilter.html

 

Thanks,

-David Lee Perish


From: [hidden email] [mailto:[hidden email]] On Behalf Of Jesse Kuhnert
Sent: Monday, July 10, 2006 8:57 PM
To: [hidden email]
Subject: Re: [Dojo-interest] FW: Feature Request: Pure JS Input Masks

 

Si :)

I think the developer that added it in is actually from Argentina (somewhere around there) .

On 7/10/06, Bill Keese <[hidden email]> wrote:

Jesse Kuhnert wrote:
> I think he means as you type literal UI masks. Ie if I say this input
> element is of format "(###) ###-####" then in my field after typing 4
> numbers I should see:
>
> "(123) 4"
>
> So..It forces the (),- , and spacing masks on your input whether you
> like it or not. A useful feature I'd love to see as well.

Ah, I see.

> We have it in
> tacos but I think it's currently broken in the english locale. (go
> figure...)

Maybe because it called "tacos".  I bet it works in spanish.
_______________________________________________
Dojo FAQ: http://dojo.jot.com/FAQ
Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest




--
Jesse Kuhnert
Tacos/Tapestry, team member/developer

Open source based consulting work centered around dojo/tapestry/tacos/hivemind.

--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.10/384 - Release Date: 7/10/2006


--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.10/384 - Release Date: 7/10/2006


_______________________________________________
Dojo FAQ: http://dojo.jot.com/FAQ
Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: FW: Feature Request: Pure JS Input Masks

Nguyen, Tom
In reply to this post by David Lee Perish

I wrote this a long time ago, before I discovered dojo…

 

I build it using homegrown dom event system to handle memory leaks and IFrame for ajax stuff…

 

http://www.noogen.net/download/free/MaskedProviderDemo.htm

 

It has been tested it in IE and Firefox.  Check it out and see if it could be something that could be refactor into a widget for dojo.  First, I would have to send in the signed CLA hehe….

Regards,

Tom Nguyen
Sr. Developer


From: [hidden email] [mailto:[hidden email]] On Behalf Of David Lee Perish
Sent: Tuesday, July 11, 2006 12:53 PM
To: [hidden email]
Subject: RE: [Dojo-interest] FW: Feature Request: Pure JS Input Masks

 

Jesse is correct.  Here are a few similar examples done in pure JS:

 

http://javascript.internet.com/forms/format-date.html

 

http://javascript.internet.com/forms/dfilter.html

 

Thanks,

-David Lee Perish


From: [hidden email] [mailto:[hidden email]] On Behalf Of Jesse Kuhnert
Sent: Monday, July 10, 2006 8:57 PM
To: [hidden email]
Subject: Re: [Dojo-interest] FW: Feature Request: Pure JS Input Masks

 

Si :)

I think the developer that added it in is actually from Argentina (somewhere around there) .

On 7/10/06, Bill Keese <[hidden email]> wrote:

Jesse Kuhnert wrote:
> I think he means as you type literal UI masks. Ie if I say this input
> element is of format "(###) ###-####" then in my field after typing 4
> numbers I should see:
>
> "(123) 4"
>
> So..It forces the (),- , and spacing masks on your input whether you
> like it or not. A useful feature I'd love to see as well.

Ah, I see.

> We have it in
> tacos but I think it's currently broken in the english locale. (go
> figure...)

Maybe because it called "tacos".  I bet it works in spanish.
_______________________________________________
Dojo FAQ: http://dojo.jot.com/FAQ
Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest




--
Jesse Kuhnert
Tacos/Tapestry, team member/developer

Open source based consulting work centered around dojo/tapestry/tacos/hivemind.

--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.10/384 - Release Date: 7/10/2006


--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.10/384 - Release Date: 7/10/2006


_______________________________________________
Dojo FAQ: http://dojo.jot.com/FAQ
Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FW: Feature Request: Pure JS Input Masks

jessek
I like it! :) Unlike the cursed internet.com your functions don't break down if I type too fast :)

I don't know how everyone else feels, but if you are willing to do the CLA and re-factor the code to fit the dojo style guide I think it would be a great addition.

On 7/11/06, Nguyen, Tom <[hidden email]> wrote:

I wrote this a long time ago, before I discovered dojo…

 

I build it using homegrown dom event system to handle memory leaks and IFrame for ajax stuff…

 

<a href="http://www.noogen.net/download/free/MaskedProviderDemo.htm" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> http://www.noogen.net/download/free/MaskedProviderDemo.htm

 

It has been tested it in IE and Firefox.  Check it out and see if it could be something that could be refactor into a widget for dojo.  First, I would have to send in the signed CLA hehe….

Regards,

Tom Nguyen
Sr. Developer


From: [hidden email] [mailto:[hidden email]] On Behalf Of David Lee Perish
Sent: Tuesday, July 11, 2006 12:53 PM

Subject: RE: [Dojo-interest] FW: Feature Request: Pure JS Input Masks

 

Jesse is correct.  Here are a few similar examples done in pure JS:

 

<a href="http://javascript.internet.com/forms/format-date.html" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> http://javascript.internet.com/forms/format-date.html

 

<a href="http://javascript.internet.com/forms/dfilter.html" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> http://javascript.internet.com/forms/dfilter.html

 

Thanks,

-David Lee Perish


From: [hidden email] [mailto:[hidden email]] On Behalf Of Jesse Kuhnert
Sent: Monday, July 10, 2006 8:57 PM
To: [hidden email]
Subject: Re: [Dojo-interest] FW: Feature Request: Pure JS Input Masks

 

Si :)

I think the developer that added it in is actually from Argentina (somewhere around there) .

On 7/10/06, Bill Keese <[hidden email]> wrote:

Jesse Kuhnert wrote:
> I think he means as you type literal UI masks. Ie if I say this input
> element is of format "(###) ###-####" then in my field after typing 4
> numbers I should see:
>
> "(123) 4"
>
> So..It forces the (),- , and spacing masks on your input whether you
> like it or not. A useful feature I'd love to see as well.

Ah, I see.

> We have it in
> tacos but I think it's currently broken in the english locale. (go
> figure...)

Maybe because it called "tacos".  I bet it works in spanish.
_______________________________________________
Dojo FAQ: <a href="http://dojo.jot.com/FAQ" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://dojo.jot.com/FAQ
Dojo Book: <a href="http://manual.dojotoolkit.org/DojoDotBook" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://manual.dojotoolkit.org/DojoDotBook
[hidden email]
<a href="http://dojotoolkit.org/mailman/listinfo/dojo-interest" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://dojotoolkit.org/mailman/listinfo/dojo-interest




--
Jesse Kuhnert
Tacos/Tapestry, team member/developer

Open source based consulting work centered around dojo/tapestry/tacos/hivemind.

--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.10/384 - Release Date: 7/10/2006


--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.10/384 - Release Date: 7/10/2006


_______________________________________________
Dojo FAQ: <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://dojo.jot.com/FAQ" target="_blank">http://dojo.jot.com/FAQ
Dojo Book: <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://manual.dojotoolkit.org/DojoDotBookDojo-interest@dojotoolkit.org" target="_blank">http://manual.dojotoolkit.org/DojoDotBook
Dojo-interest@...
<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://dojotoolkit.org/mailman/listinfo/dojo-interest" target="_blank">http://dojotoolkit.org/mailman/listinfo/dojo-interest





--
Jesse Kuhnert
Tacos/Tapestry, team member/developer

Open source based consulting work centered around dojo/tapestry/tacos/hivemind.
_______________________________________________
Dojo FAQ: http://dojo.jot.com/FAQ
Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FW: Feature Request: Pure JS Input Masks

Karl Tiedt
Maybe thats something that Joose (I cant remember/dont know his
realname) could incorporate into his FC (form container) widget... it
does a ton of handy things with forms already (and the form widgets
included in Dojo)....

-Karl

On 7/12/06, Jesse Kuhnert <[hidden email]> wrote:

> I like it! :) Unlike the cursed internet.com your functions don't break down
> if I type too fast :)
>
> I don't know how everyone else feels, but if you are willing to do the CLA
> and re-factor the code to fit the dojo style guide I think it would be a
> great addition.
>
>
> On 7/11/06, Nguyen, Tom <[hidden email]> wrote:
> >
> >
> >
> >
> >
> > I wrote this a long time ago, before I discovered dojo…
> >
> >
> >
> > I build it using homegrown dom event system to handle memory leaks and
> IFrame for ajax stuff…
> >
> >
> >
> >
> http://www.noogen.net/download/free/MaskedProviderDemo.htm
> >
> >
> >
> > It has been tested it in IE and Firefox.  Check it out and see if it could
> be something that could be refactor into a widget for dojo.  First, I would
> have to send in the signed CLA hehe….
> >
> >
> > Regards,
> >
> > Tom Nguyen
> > Sr. Developer
> >
> >
> >
> >
> > ________________________________
>
> >
> > From: [hidden email]
> [mailto:[hidden email]] On Behalf Of
> David Lee Perish
> > Sent: Tuesday, July 11, 2006 12:53 PM
> >
> > To: [hidden email]
> >
> > Subject: RE: [Dojo-interest] FW: Feature Request: Pure JS Input Masks
> >
> >
> >
> >
> >
> >
> > Jesse is correct.  Here are a few similar examples done in pure JS:
> >
> >
> >
> > http://javascript.internet.com/forms/format-date.html
> >
> >
> >
> > http://javascript.internet.com/forms/dfilter.html
> >
> >
> >
> > Thanks,
> >
> > -David Lee Perish
> >
> > ________________________________
>
> >
> > From: [hidden email] [mailto:
> [hidden email]] On Behalf Of Jesse
> Kuhnert
> > Sent: Monday, July 10, 2006 8:57 PM
> > To: [hidden email]
> > Subject: Re: [Dojo-interest] FW: Feature Request: Pure JS Input Masks
> >
> >
> >
> > Si :)
> >
> > I think the developer that added it in is actually from Argentina
> (somewhere around there) .
> >
> >
> > On 7/10/06, Bill Keese < [hidden email]> wrote:
> >
> > Jesse Kuhnert wrote:
> > > I think he means as you type literal UI masks. Ie if I say this input
> > > element is of format "(###) ###-####" then in my field after typing 4
> > > numbers I should see:
> > >
> > > "(123) 4"
> > >
> > > So..It forces the (),- , and spacing masks on your input whether you
> > > like it or not. A useful feature I'd love to see as well.
> >
> > Ah, I see.
> >
> > > We have it in
> > > tacos but I think it's currently broken in the english locale. (go
> > > figure...)
> >
> > Maybe because it called "tacos".  I bet it works in spanish.
> > _______________________________________________
> > Dojo FAQ: http://dojo.jot.com/FAQ
> > Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
> > [hidden email]
> > http://dojotoolkit.org/mailman/listinfo/dojo-interest
> >
> >
> >
> >
> > --
> > Jesse Kuhnert
> > Tacos/Tapestry, team member/developer
> >
> > Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind.
> >
> > --
> > No virus found in this incoming message.
> > Checked by AVG Free Edition.
> > Version: 7.1.394 / Virus Database: 268.9.10/384 - Release Date: 7/10/2006
> >
> >
> >
> >
> > --
> > No virus found in this outgoing message.
> > Checked by AVG Free Edition.
> > Version: 7.1.394 / Virus Database: 268.9.10/384 - Release Date: 7/10/2006
> >
> > _______________________________________________
> > Dojo FAQ: http://dojo.jot.com/FAQ
> > Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
> > [hidden email]
> > http://dojotoolkit.org/mailman/listinfo/dojo-interest
> >
> >
> >
>
>
>
> --
> Jesse Kuhnert
> Tacos/Tapestry, team member/developer
>
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind.
> _______________________________________________
> Dojo FAQ: http://dojo.jot.com/FAQ
> Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
> [hidden email]
> http://dojotoolkit.org/mailman/listinfo/dojo-interest
>
>
>


--
-Karl Tiedt
_______________________________________________
Dojo FAQ: http://dojo.jot.com/FAQ
Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FW: Feature Request: Pure JS Input Masks

Karl Tiedt
Woah, i just looked at the demo and thats awesome... like the popup
error dialog... although its got a foobar drag method to it :P (was
dragging without clicking on it but was limited to how far it would
drag until clicked)... was gonna comment on only error checking for
that one field but I see in the sRC that its only enabled for that one
field ;)

Awesome stuff :)

On 7/12/06, Karl Tiedt <[hidden email]> wrote:

> Maybe thats something that Joose (I cant remember/dont know his
> realname) could incorporate into his FC (form container) widget... it
> does a ton of handy things with forms already (and the form widgets
> included in Dojo)....
>
> -Karl
>
> On 7/12/06, Jesse Kuhnert <[hidden email]> wrote:
> > I like it! :) Unlike the cursed internet.com your functions don't break down
> > if I type too fast :)
> >
> > I don't know how everyone else feels, but if you are willing to do the CLA
> > and re-factor the code to fit the dojo style guide I think it would be a
> > great addition.
> >
> >
> > On 7/11/06, Nguyen, Tom <[hidden email]> wrote:
> > >
> > >
> > >
> > >
> > >
> > > I wrote this a long time ago, before I discovered dojo…
> > >
> > >
> > >
> > > I build it using homegrown dom event system to handle memory leaks and
> > IFrame for ajax stuff…
> > >
> > >
> > >
> > >
> > http://www.noogen.net/download/free/MaskedProviderDemo.htm
> > >
> > >
> > >
> > > It has been tested it in IE and Firefox.  Check it out and see if it could
> > be something that could be refactor into a widget for dojo.  First, I would
> > have to send in the signed CLA hehe….
> > >
> > >
> > > Regards,
> > >
> > > Tom Nguyen
> > > Sr. Developer
> > >
> > >
> > >
> > >
> > > ________________________________
> >
> > >
> > > From: [hidden email]
> > [mailto:[hidden email]] On Behalf Of
> > David Lee Perish
> > > Sent: Tuesday, July 11, 2006 12:53 PM
> > >
> > > To: [hidden email]
> > >
> > > Subject: RE: [Dojo-interest] FW: Feature Request: Pure JS Input Masks
> > >
> > >
> > >
> > >
> > >
> > >
> > > Jesse is correct.  Here are a few similar examples done in pure JS:
> > >
> > >
> > >
> > > http://javascript.internet.com/forms/format-date.html
> > >
> > >
> > >
> > > http://javascript.internet.com/forms/dfilter.html
> > >
> > >
> > >
> > > Thanks,
> > >
> > > -David Lee Perish
> > >
> > > ________________________________
> >
> > >
> > > From: [hidden email] [mailto:
> > [hidden email]] On Behalf Of Jesse
> > Kuhnert
> > > Sent: Monday, July 10, 2006 8:57 PM
> > > To: [hidden email]
> > > Subject: Re: [Dojo-interest] FW: Feature Request: Pure JS Input Masks
> > >
> > >
> > >
> > > Si :)
> > >
> > > I think the developer that added it in is actually from Argentina
> > (somewhere around there) .
> > >
> > >
> > > On 7/10/06, Bill Keese < [hidden email]> wrote:
> > >
> > > Jesse Kuhnert wrote:
> > > > I think he means as you type literal UI masks. Ie if I say this input
> > > > element is of format "(###) ###-####" then in my field after typing 4
> > > > numbers I should see:
> > > >
> > > > "(123) 4"
> > > >
> > > > So..It forces the (),- , and spacing masks on your input whether you
> > > > like it or not. A useful feature I'd love to see as well.
> > >
> > > Ah, I see.
> > >
> > > > We have it in
> > > > tacos but I think it's currently broken in the english locale. (go
> > > > figure...)
> > >
> > > Maybe because it called "tacos".  I bet it works in spanish.
> > > _______________________________________________
> > > Dojo FAQ: http://dojo.jot.com/FAQ
> > > Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
> > > [hidden email]
> > > http://dojotoolkit.org/mailman/listinfo/dojo-interest
> > >
> > >
> > >
> > >
> > > --
> > > Jesse Kuhnert
> > > Tacos/Tapestry, team member/developer
> > >
> > > Open source based consulting work centered around
> > dojo/tapestry/tacos/hivemind.
> > >
> > > --
> > > No virus found in this incoming message.
> > > Checked by AVG Free Edition.
> > > Version: 7.1.394 / Virus Database: 268.9.10/384 - Release Date: 7/10/2006
> > >
> > >
> > >
> > >
> > > --
> > > No virus found in this outgoing message.
> > > Checked by AVG Free Edition.
> > > Version: 7.1.394 / Virus Database: 268.9.10/384 - Release Date: 7/10/2006
> > >
> > > _______________________________________________
> > > Dojo FAQ: http://dojo.jot.com/FAQ
> > > Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
> > > [hidden email]
> > > http://dojotoolkit.org/mailman/listinfo/dojo-interest
> > >
> > >
> > >
> >
> >
> >
> > --
> > Jesse Kuhnert
> > Tacos/Tapestry, team member/developer
> >
> > Open source based consulting work centered around
> > dojo/tapestry/tacos/hivemind.
> > _______________________________________________
> > Dojo FAQ: http://dojo.jot.com/FAQ
> > Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
> > [hidden email]
> > http://dojotoolkit.org/mailman/listinfo/dojo-interest
> >
> >
> >
>
>
> --
> -Karl Tiedt
>


--
-Karl Tiedt
_______________________________________________
Dojo FAQ: http://dojo.jot.com/FAQ
Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: FW: Feature Request: Pure JS Input Masks

Nguyen, Tom
In reply to this post by David Lee Perish
Yep, no need for validation if you already masked it right?

And yeah, unfortunately, I began to dislike the popup error dialog.
When I designed it, I set out to make the popup dialog re-usable and to
fix IE bleeding by using direct iframe (instead of shimming); but then I
started to get all kind of security errors, especially doing it across
domain.  And there are some issues with the dragging as you've
mentioned.

When I'm refactoring it, I'm considering of using dojo FloatingPane
instead of the existing iframe.

Regards,

Tom Nguyen
Sr. Developer


> -----Original Message-----
> From: [hidden email] [mailto:dojo-interest-
> [hidden email]] On Behalf Of Karl Tiedt
> Sent: Tuesday, July 11, 2006 1:45 PM
> To: [hidden email]
> Subject: Re: [Dojo-interest] FW: Feature Request: Pure JS Input Masks
>
> Woah, i just looked at the demo and thats awesome... like the popup
> error dialog... although its got a foobar drag method to it :P (was
> dragging without clicking on it but was limited to how far it would
> drag until clicked)... was gonna comment on only error checking for
> that one field but I see in the sRC that its only enabled for that one
> field ;)
>
> Awesome stuff :)
>
> On 7/12/06, Karl Tiedt <[hidden email]> wrote:
> > Maybe thats something that Joose (I cant remember/dont know his
> > realname) could incorporate into his FC (form container) widget...
it

> > does a ton of handy things with forms already (and the form widgets
> > included in Dojo)....
> >
> > -Karl
> >
> > On 7/12/06, Jesse Kuhnert <[hidden email]> wrote:
> > > I like it! :) Unlike the cursed internet.com your functions don't
> break down
> > > if I type too fast :)
> > >
> > > I don't know how everyone else feels, but if you are willing to do
the
> CLA
> > > and re-factor the code to fit the dojo style guide I think it
would be

> a
> > > great addition.
> > >
> > >
> > > On 7/11/06, Nguyen, Tom <[hidden email]> wrote:
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > I wrote this a long time ago, before I discovered dojo...
> > > >
> > > >
> > > >
> > > > I build it using homegrown dom event system to handle memory
leaks

> and
> > > IFrame for ajax stuff...
> > > >
> > > >
> > > >
> > > >
> > > http://www.noogen.net/download/free/MaskedProviderDemo.htm
> > > >
> > > >
> > > >
> > > > It has been tested it in IE and Firefox.  Check it out and see
if it
> could
> > > be something that could be refactor into a widget for dojo.
First, I

> would
> > > have to send in the signed CLA hehe....
> > > >
> > > >
> > > > Regards,
> > > >
> > > > Tom Nguyen
> > > > Sr. Developer
> > > >
> > > >
> > > >
> > > >
> > > > ________________________________
> > >
> > > >
> > > > From: [hidden email]
> > > [mailto:[hidden email]] On Behalf Of
> > > David Lee Perish
> > > > Sent: Tuesday, July 11, 2006 12:53 PM
> > > >
> > > > To: [hidden email]
> > > >
> > > > Subject: RE: [Dojo-interest] FW: Feature Request: Pure JS Input
> Masks
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > Jesse is correct.  Here are a few similar examples done in pure
JS:

> > > >
> > > >
> > > >
> > > > http://javascript.internet.com/forms/format-date.html
> > > >
> > > >
> > > >
> > > > http://javascript.internet.com/forms/dfilter.html
> > > >
> > > >
> > > >
> > > > Thanks,
> > > >
> > > > -David Lee Perish
> > > >
> > > > ________________________________
> > >
> > > >
> > > > From: [hidden email] [mailto:
> > > [hidden email]] On Behalf Of Jesse
> > > Kuhnert
> > > > Sent: Monday, July 10, 2006 8:57 PM
> > > > To: [hidden email]
> > > > Subject: Re: [Dojo-interest] FW: Feature Request: Pure JS Input
> Masks
> > > >
> > > >
> > > >
> > > > Si :)
> > > >
> > > > I think the developer that added it in is actually from
Argentina
> > > (somewhere around there) .
> > > >
> > > >
> > > > On 7/10/06, Bill Keese < [hidden email]> wrote:
> > > >
> > > > Jesse Kuhnert wrote:
> > > > > I think he means as you type literal UI masks. Ie if I say
this
> input
> > > > > element is of format "(###) ###-####" then in my field after
> typing 4
> > > > > numbers I should see:
> > > > >
> > > > > "(123) 4"
> > > > >
> > > > > So..It forces the (),- , and spacing masks on your input
whether
> you
> > > > > like it or not. A useful feature I'd love to see as well.
> > > >
> > > > Ah, I see.
> > > >
> > > > > We have it in
> > > > > tacos but I think it's currently broken in the english locale.
(go

> > > > > figure...)
> > > >
> > > > Maybe because it called "tacos".  I bet it works in spanish.
> > > > _______________________________________________
> > > > Dojo FAQ: http://dojo.jot.com/FAQ
> > > > Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
> > > > [hidden email]
> > > > http://dojotoolkit.org/mailman/listinfo/dojo-interest
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Jesse Kuhnert
> > > > Tacos/Tapestry, team member/developer
> > > >
> > > > Open source based consulting work centered around
> > > dojo/tapestry/tacos/hivemind.
> > > >
> > > > --
> > > > No virus found in this incoming message.
> > > > Checked by AVG Free Edition.
> > > > Version: 7.1.394 / Virus Database: 268.9.10/384 - Release Date:
> 7/10/2006
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > No virus found in this outgoing message.
> > > > Checked by AVG Free Edition.
> > > > Version: 7.1.394 / Virus Database: 268.9.10/384 - Release Date:
> 7/10/2006
> > > >
> > > > _______________________________________________
> > > > Dojo FAQ: http://dojo.jot.com/FAQ
> > > > Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
> > > > [hidden email]
> > > > http://dojotoolkit.org/mailman/listinfo/dojo-interest
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Jesse Kuhnert
> > > Tacos/Tapestry, team member/developer
> > >
> > > Open source based consulting work centered around
> > > dojo/tapestry/tacos/hivemind.
> > > _______________________________________________
> > > Dojo FAQ: http://dojo.jot.com/FAQ
> > > Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
> > > [hidden email]
> > > http://dojotoolkit.org/mailman/listinfo/dojo-interest
> > >
> > >
> > >
> >
> >
> > --
> > -Karl Tiedt
> >
>
>
> --
> -Karl Tiedt
> _______________________________________________
> Dojo FAQ: http://dojo.jot.com/FAQ
> Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
> [hidden email]
> http://dojotoolkit.org/mailman/listinfo/dojo-interest
_______________________________________________
Dojo FAQ: http://dojo.jot.com/FAQ
Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FW: Feature Request: Pure JS Input Masks

Karl Tiedt
Well there is need for validating ;) 25:64:93 isnt a valid 24hr time ;)

and possible toolTip instead of Floating Panes... although Panes would
likely provide a cleaner approach but might be more... expensive
time/memory wise... not sure on that

-Karl

On 7/12/06, Nguyen, Tom <[hidden email]> wrote:

> Yep, no need for validation if you already masked it right?
>
> And yeah, unfortunately, I began to dislike the popup error dialog.
> When I designed it, I set out to make the popup dialog re-usable and to
> fix IE bleeding by using direct iframe (instead of shimming); but then I
> started to get all kind of security errors, especially doing it across
> domain.  And there are some issues with the dragging as you've
> mentioned.
>
> When I'm refactoring it, I'm considering of using dojo FloatingPane
> instead of the existing iframe.
>
> Regards,
>
> Tom Nguyen
> Sr. Developer
>
>
> > -----Original Message-----
> > From: [hidden email] [mailto:dojo-interest-
> > [hidden email]] On Behalf Of Karl Tiedt
> > Sent: Tuesday, July 11, 2006 1:45 PM
> > To: [hidden email]
> > Subject: Re: [Dojo-interest] FW: Feature Request: Pure JS Input Masks
> >
> > Woah, i just looked at the demo and thats awesome... like the popup
> > error dialog... although its got a foobar drag method to it :P (was
> > dragging without clicking on it but was limited to how far it would
> > drag until clicked)... was gonna comment on only error checking for
> > that one field but I see in the sRC that its only enabled for that one
> > field ;)
> >
> > Awesome stuff :)
> >
> > On 7/12/06, Karl Tiedt <[hidden email]> wrote:
> > > Maybe thats something that Joose (I cant remember/dont know his
> > > realname) could incorporate into his FC (form container) widget...
> it
> > > does a ton of handy things with forms already (and the form widgets
> > > included in Dojo)....
> > >
> > > -Karl
> > >
> > > On 7/12/06, Jesse Kuhnert <[hidden email]> wrote:
> > > > I like it! :) Unlike the cursed internet.com your functions don't
> > break down
> > > > if I type too fast :)
> > > >
> > > > I don't know how everyone else feels, but if you are willing to do
> the
> > CLA
> > > > and re-factor the code to fit the dojo style guide I think it
> would be
> > a
> > > > great addition.
> > > >
> > > >
> > > > On 7/11/06, Nguyen, Tom <[hidden email]> wrote:
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > I wrote this a long time ago, before I discovered dojo...
> > > > >
> > > > >
> > > > >
> > > > > I build it using homegrown dom event system to handle memory
> leaks
> > and
> > > > IFrame for ajax stuff...
> > > > >
> > > > >
> > > > >
> > > > >
> > > > http://www.noogen.net/download/free/MaskedProviderDemo.htm
> > > > >
> > > > >
> > > > >
> > > > > It has been tested it in IE and Firefox.  Check it out and see
> if it
> > could
> > > > be something that could be refactor into a widget for dojo.
> First, I
> > would
> > > > have to send in the signed CLA hehe....
> > > > >
> > > > >
> > > > > Regards,
> > > > >
> > > > > Tom Nguyen
> > > > > Sr. Developer
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > ________________________________
> > > >
> > > > >
> > > > > From: [hidden email]
> > > > [mailto:[hidden email]] On Behalf Of
> > > > David Lee Perish
> > > > > Sent: Tuesday, July 11, 2006 12:53 PM
> > > > >
> > > > > To: [hidden email]
> > > > >
> > > > > Subject: RE: [Dojo-interest] FW: Feature Request: Pure JS Input
> > Masks
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > Jesse is correct.  Here are a few similar examples done in pure
> JS:
> > > > >
> > > > >
> > > > >
> > > > > http://javascript.internet.com/forms/format-date.html
> > > > >
> > > > >
> > > > >
> > > > > http://javascript.internet.com/forms/dfilter.html
> > > > >
> > > > >
> > > > >
> > > > > Thanks,
> > > > >
> > > > > -David Lee Perish
> > > > >
> > > > > ________________________________
> > > >
> > > > >
> > > > > From: [hidden email] [mailto:
> > > > [hidden email]] On Behalf Of Jesse
> > > > Kuhnert
> > > > > Sent: Monday, July 10, 2006 8:57 PM
> > > > > To: [hidden email]
> > > > > Subject: Re: [Dojo-interest] FW: Feature Request: Pure JS Input
> > Masks
> > > > >
> > > > >
> > > > >
> > > > > Si :)
> > > > >
> > > > > I think the developer that added it in is actually from
> Argentina
> > > > (somewhere around there) .
> > > > >
> > > > >
> > > > > On 7/10/06, Bill Keese < [hidden email]> wrote:
> > > > >
> > > > > Jesse Kuhnert wrote:
> > > > > > I think he means as you type literal UI masks. Ie if I say
> this
> > input
> > > > > > element is of format "(###) ###-####" then in my field after
> > typing 4
> > > > > > numbers I should see:
> > > > > >
> > > > > > "(123) 4"
> > > > > >
> > > > > > So..It forces the (),- , and spacing masks on your input
> whether
> > you
> > > > > > like it or not. A useful feature I'd love to see as well.
> > > > >
> > > > > Ah, I see.
> > > > >
> > > > > > We have it in
> > > > > > tacos but I think it's currently broken in the english locale.
> (go
> > > > > > figure...)
> > > > >
> > > > > Maybe because it called "tacos".  I bet it works in spanish.
> > > > > _______________________________________________
> > > > > Dojo FAQ: http://dojo.jot.com/FAQ
> > > > > Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
> > > > > [hidden email]
> > > > > http://dojotoolkit.org/mailman/listinfo/dojo-interest
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Jesse Kuhnert
> > > > > Tacos/Tapestry, team member/developer
> > > > >
> > > > > Open source based consulting work centered around
> > > > dojo/tapestry/tacos/hivemind.
> > > > >
> > > > > --
> > > > > No virus found in this incoming message.
> > > > > Checked by AVG Free Edition.
> > > > > Version: 7.1.394 / Virus Database: 268.9.10/384 - Release Date:
> > 7/10/2006
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > No virus found in this outgoing message.
> > > > > Checked by AVG Free Edition.
> > > > > Version: 7.1.394 / Virus Database: 268.9.10/384 - Release Date:
> > 7/10/2006
> > > > >
> > > > > _______________________________________________
> > > > > Dojo FAQ: http://dojo.jot.com/FAQ
> > > > > Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
> > > > > [hidden email]
> > > > > http://dojotoolkit.org/mailman/listinfo/dojo-interest
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Jesse Kuhnert
> > > > Tacos/Tapestry, team member/developer
> > > >
> > > > Open source based consulting work centered around
> > > > dojo/tapestry/tacos/hivemind.
> > > > _______________________________________________
> > > > Dojo FAQ: http://dojo.jot.com/FAQ
> > > > Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
> > > > [hidden email]
> > > > http://dojotoolkit.org/mailman/listinfo/dojo-interest
> > > >
> > > >
> > > >
> > >
> > >
> > > --
> > > -Karl Tiedt
> > >
> >
> >
> > --
> > -Karl Tiedt
> > _______________________________________________
> > Dojo FAQ: http://dojo.jot.com/FAQ
> > Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
> > [hidden email]
> > http://dojotoolkit.org/mailman/listinfo/dojo-interest
> _______________________________________________
> Dojo FAQ: http://dojo.jot.com/FAQ
> Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
> [hidden email]
> http://dojotoolkit.org/mailman/listinfo/dojo-interest
>


--
-Karl Tiedt
_______________________________________________
Dojo FAQ: http://dojo.jot.com/FAQ
Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FW: Feature Request: Pure JS Input Masks

Bill Keese-2
In reply to this post by Nguyen, Tom
Nguyen, Tom wrote:
> I wrote this a long time ago, before I discovered dojo…
>
>
> http://www.noogen.net/download/free/MaskedProviderDemo.htm
>
> It has been tested it in IE and Firefox.  Check it out and see if it
> could be something that could be refactor into a widget for dojo.  
> First, I would have to send in the signed CLA hehe….

I like it; I haven't looked at the code at all but the functionality
seems nice.  Would complement the other form widgets.

I didn't understand the floating pane / tooltip discussion.  The
validation widgets print an error message to the right of the input
field.  If you did want to pop something up I would think it would be an
alert() or the Dialog widget.

Karl Tiedt wrote:
> Well there is need for validating  ;)  25:64:93 isnt a valid 24hr time  ;)

I tried inputting this value.  It lets me.  That's not good.  It would
be nicer if it just didn't let me type in a value like that.

_______________________________________________
Dojo FAQ: http://dojo.jot.com/FAQ
Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: FW: Feature Request: Pure JS Input Masks

Nguyen, Tom
In reply to this post by David Lee Perish
I've done a lot of thinking on this date/time masking a long time go and
here is my conclusion:

If you think about it, restricting user input of date and time mask is
more like input validation and not masking.  Masking/format allow user
friendly input, we only want to help the user by providing mask/format
that meets our requirement.  We don't want to anger the user with too
much restriction.

Strict Date and Time MASKING is hard to do even on desktop application.
I'm not saying that it's impossible, but it's not worth it...  It's also
not efficient...

Why is it hard?
Simple scenario:
        I'm a user trying to enter 02/29/2007.  So what would masking do
in this situation after I type in the number 7 in year 2007?  Is
02/29/2007 a valid input?  If you are wondering, I had to look at my
calendar to make sure that this is an invalid input before I set out to
discuss this example.  You are probably doing the same?   But then we
are programmer, it's not hard for us to check for this date in code
right?  So what do we do to tell the user that the input is invalid?  

Put yourself in the user shoe:

        1.  Clear the entire input?  

If you are the user, you would be annoyed.  Why the heck did this thing
clear my input?  I'm going to report this as a bug.  

        2.  Simple!  Change the day from 29 to 28?

Not as simple as you think: You would have to have extra logics for
month with different max days: 28, 29, 30, and 31 days.  That's just the
tip of the icebergs...

Of course, we can do it the lazy way by reset the day to 00.  This could
anger your user because they will have to use the mouse to the day
position so they can change the value.

Simple: why don't we move it for them?  This is not as easy as you think
and can lead to user being angry at you.

So on and so on...

        3.  Don't let the user enter the number 7?  Would it make you
mad if you are on a roll and something is restricting you?  Of the top
of your head, would you know that 2007 is not a leap year?  I had to
spend time go lookup the date in the calendar.

Same thing goes for time.  You have 24 hours, 60 hours, 60 minutes, 60
seconds and so on...  Too many criteria just to strictly mask it when
you really mean Validation!

Also, we are/should be validating it.  There is no need for the
complication.  You can go as far as separating Month, Day, Year to
different controls, but that's even harder to input.

And why mask when you have DateTimePicker?  You want to improve user
experience right?  Especially for the fast typers who don't like to use
the mouse.

So, in conclusion, we don't want to confuse Masking and Validation.
Validation makes it easier, fast typers don't have to worry about
correcting it until they are ready.  Users can continue to input their
data and go back to fix it when they are ready.

Regards,

Tom Nguyen
Sr. Developer

Phewwwwww!!!  That was a long email.  I know, I know.  I'm a bit wordy.

> -----Original Message-----
> From: [hidden email] [mailto:dojo-interest-
> [hidden email]] On Behalf Of Bill Keese
> Sent: Tuesday, July 11, 2006 7:06 PM
> To: [hidden email]
> Subject: Re: [Dojo-interest] FW: Feature Request: Pure JS Input Masks
>
> Nguyen, Tom wrote:
> > I wrote this a long time ago, before I discovered dojo...
> >
> >
> > http://www.noogen.net/download/free/MaskedProviderDemo.htm
> >
> > It has been tested it in IE and Firefox.  Check it out and see if it
> > could be something that could be refactor into a widget for dojo.
> > First, I would have to send in the signed CLA hehe....
>
> I like it; I haven't looked at the code at all but the functionality
> seems nice.  Would complement the other form widgets.
>
> I didn't understand the floating pane / tooltip discussion.  The
> validation widgets print an error message to the right of the input
> field.  If you did want to pop something up I would think it would be
an
> alert() or the Dialog widget.
>
> Karl Tiedt wrote:
> > Well there is need for validating  ;)  25:64:93 isnt a valid 24hr
time

> ;)
>
> I tried inputting this value.  It lets me.  That's not good.  It would
> be nicer if it just didn't let me type in a value like that.
>
> _______________________________________________
> Dojo FAQ: http://dojo.jot.com/FAQ
> Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
> [hidden email]
> http://dojotoolkit.org/mailman/listinfo/dojo-interest
_______________________________________________
Dojo FAQ: http://dojo.jot.com/FAQ
Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FW: Feature Request: Pure JS Input Masks

Karl Tiedt
My idea would be to hilight the offending section... but I dont think
thats possible (change the bg color of part of a text Input?) and I
know off the top of my head that 07 is not a leap year :P but thats
because i know the standing rule for determining leap years by heart
:P

I can see the logic behind not doing, but I like the way you did it in
that one field where it just flags the field and lets you keep on
going.

On 7/12/06, Nguyen, Tom <[hidden email]> wrote:

> I've done a lot of thinking on this date/time masking a long time go and
> here is my conclusion:
>
> If you think about it, restricting user input of date and time mask is
> more like input validation and not masking.  Masking/format allow user
> friendly input, we only want to help the user by providing mask/format
> that meets our requirement.  We don't want to anger the user with too
> much restriction.
>
> Strict Date and Time MASKING is hard to do even on desktop application.
> I'm not saying that it's impossible, but it's not worth it...  It's also
> not efficient...
>
> Why is it hard?
> Simple scenario:
>         I'm a user trying to enter 02/29/2007.  So what would masking do
> in this situation after I type in the number 7 in year 2007?  Is
> 02/29/2007 a valid input?  If you are wondering, I had to look at my
> calendar to make sure that this is an invalid input before I set out to
> discuss this example.  You are probably doing the same?   But then we
> are programmer, it's not hard for us to check for this date in code
> right?  So what do we do to tell the user that the input is invalid?
>
> Put yourself in the user shoe:
>
>         1.  Clear the entire input?
>
> If you are the user, you would be annoyed.  Why the heck did this thing
> clear my input?  I'm going to report this as a bug.
>
>         2.  Simple!  Change the day from 29 to 28?
>
> Not as simple as you think: You would have to have extra logics for
> month with different max days: 28, 29, 30, and 31 days.  That's just the
> tip of the icebergs...
>
> Of course, we can do it the lazy way by reset the day to 00.  This could
> anger your user because they will have to use the mouse to the day
> position so they can change the value.
>
> Simple: why don't we move it for them?  This is not as easy as you think
> and can lead to user being angry at you.
>
> So on and so on...
>
>         3.  Don't let the user enter the number 7?  Would it make you
> mad if you are on a roll and something is restricting you?  Of the top
> of your head, would you know that 2007 is not a leap year?  I had to
> spend time go lookup the date in the calendar.
>
> Same thing goes for time.  You have 24 hours, 60 hours, 60 minutes, 60
> seconds and so on...  Too many criteria just to strictly mask it when
> you really mean Validation!
>
> Also, we are/should be validating it.  There is no need for the
> complication.  You can go as far as separating Month, Day, Year to
> different controls, but that's even harder to input.
>
> And why mask when you have DateTimePicker?  You want to improve user
> experience right?  Especially for the fast typers who don't like to use
> the mouse.
>
> So, in conclusion, we don't want to confuse Masking and Validation.
> Validation makes it easier, fast typers don't have to worry about
> correcting it until they are ready.  Users can continue to input their
> data and go back to fix it when they are ready.
>
> Regards,
>
> Tom Nguyen
> Sr. Developer
>
> Phewwwwww!!!  That was a long email.  I know, I know.  I'm a bit wordy.
>
> > -----Original Message-----
> > From: [hidden email] [mailto:dojo-interest-
> > [hidden email]] On Behalf Of Bill Keese
> > Sent: Tuesday, July 11, 2006 7:06 PM
> > To: [hidden email]
> > Subject: Re: [Dojo-interest] FW: Feature Request: Pure JS Input Masks
> >
> > Nguyen, Tom wrote:
> > > I wrote this a long time ago, before I discovered dojo...
> > >
> > >
> > > http://www.noogen.net/download/free/MaskedProviderDemo.htm
> > >
> > > It has been tested it in IE and Firefox.  Check it out and see if it
> > > could be something that could be refactor into a widget for dojo.
> > > First, I would have to send in the signed CLA hehe....
> >
> > I like it; I haven't looked at the code at all but the functionality
> > seems nice.  Would complement the other form widgets.
> >
> > I didn't understand the floating pane / tooltip discussion.  The
> > validation widgets print an error message to the right of the input
> > field.  If you did want to pop something up I would think it would be
> an
> > alert() or the Dialog widget.
> >
> > Karl Tiedt wrote:
> > > Well there is need for validating  ;)  25:64:93 isnt a valid 24hr
> time
> > ;)
> >
> > I tried inputting this value.  It lets me.  That's not good.  It would
> > be nicer if it just didn't let me type in a value like that.
> >
> > _______________________________________________
> > Dojo FAQ: http://dojo.jot.com/FAQ
> > Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
> > [hidden email]
> > http://dojotoolkit.org/mailman/listinfo/dojo-interest
> _______________________________________________
> Dojo FAQ: http://dojo.jot.com/FAQ
> Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
> [hidden email]
> http://dojotoolkit.org/mailman/listinfo/dojo-interest
>


--
-Karl Tiedt
_______________________________________________
Dojo FAQ: http://dojo.jot.com/FAQ
Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FW: Feature Request: Pure JS Input Masks

jessek
Well...Either way, I like the way you think Tom :) Good stuff. Hope it shows up somewhere in dojo.

On 7/11/06, Karl Tiedt <[hidden email]> wrote:
My idea would be to hilight the offending section... but I dont think
thats possible (change the bg color of part of a text Input?) and I
know off the top of my head that 07 is not a leap year :P but thats
because i know the standing rule for determining leap years by heart
:P

I can see the logic behind not doing, but I like the way you did it in
that one field where it just flags the field and lets you keep on
going.

On 7/12/06, Nguyen, Tom <[hidden email]> wrote:

> I've done a lot of thinking on this date/time masking a long time go and
> here is my conclusion:
>
> If you think about it, restricting user input of date and time mask is
> more like input validation and not masking.  Masking/format allow user
> friendly input, we only want to help the user by providing mask/format
> that meets our requirement.  We don't want to anger the user with too
> much restriction.
>
> Strict Date and Time MASKING is hard to do even on desktop application.
> I'm not saying that it's impossible, but it's not worth it...  It's also
> not efficient...
>

> Why is it hard?
> Simple scenario:
>         I'm a user trying to enter 02/29/2007.  So what would masking do
> in this situation after I type in the number 7 in year 2007?  Is
> 02/29/2007 a valid input?  If you are wondering, I had to look at my
> calendar to make sure that this is an invalid input before I set out to
> discuss this example.  You are probably doing the same?   But then we
> are programmer, it's not hard for us to check for this date in code
> right?  So what do we do to tell the user that the input is invalid?
>
> Put yourself in the user shoe:
>
>         1.  Clear the entire input?
>
> If you are the user, you would be annoyed.  Why the heck did this thing
> clear my input?  I'm going to report this as a bug.
>
>         2.  Simple!  Change the day from 29 to 28?
>
> Not as simple as you think: You would have to have extra logics for
> month with different max days: 28, 29, 30, and 31 days.  That's just the
> tip of the icebergs...
>
> Of course, we can do it the lazy way by reset the day to 00.  This could
> anger your user because they will have to use the mouse to the day
> position so they can change the value.
>
> Simple: why don't we move it for them?  This is not as easy as you think
> and can lead to user being angry at you.
>
> So on and so on...
>
>         3.  Don't let the user enter the number 7?  Would it make you
> mad if you are on a roll and something is restricting you?  Of the top
> of your head, would you know that 2007 is not a leap year?  I had to
> spend time go lookup the date in the calendar.
>
> Same thing goes for time.  You have 24 hours, 60 hours, 60 minutes, 60

> seconds and so on...  Too many criteria just to strictly mask it when
> you really mean Validation!
>
> Also, we are/should be validating it.  There is no need for the
> complication.  You can go as far as separating Month, Day, Year to
> different controls, but that's even harder to input.
>
> And why mask when you have DateTimePicker?  You want to improve user
> experience right?  Especially for the fast typers who don't like to use
> the mouse.
>
> So, in conclusion, we don't want to confuse Masking and Validation.
> Validation makes it easier, fast typers don't have to worry about
> correcting it until they are ready.  Users can continue to input their
> data and go back to fix it when they are ready.
>
> Regards,
>
> Tom Nguyen
> Sr. Developer
>
> Phewwwwww!!!  That was a long email.  I know, I know.  I'm a bit wordy.
>
> > -----Original Message-----
> > From: [hidden email] [mailto:[hidden email]
> > [hidden email]] On Behalf Of Bill Keese
> > Sent: Tuesday, July 11, 2006 7:06 PM
> > To: [hidden email]

> > Subject: Re: [Dojo-interest] FW: Feature Request: Pure JS Input Masks
> >
> > Nguyen, Tom wrote:
> > > I wrote this a long time ago, before I discovered dojo...
> > >
> > >
> > > http://www.noogen.net/download/free/MaskedProviderDemo.htm
> > >
> > > It has been tested it in IE and Firefox.  Check it out and see if it
> > > could be something that could be refactor into a widget for dojo.
> > > First, I would have to send in the signed CLA hehe....
> >
> > I like it; I haven't looked at the code at all but the functionality
> > seems nice.  Would complement the other form widgets.
> >
> > I didn't understand the floating pane / tooltip discussion.  The
> > validation widgets print an error message to the right of the input
> > field.  If you did want to pop something up I would think it would be
> an
> > alert() or the Dialog widget.
> >

> > Karl Tiedt wrote:
> > > Well there is need for validating  ;)  25:64:93 isnt a valid 24hr
> time
> > ;)
> >
> > I tried inputting this value.  It lets me.  That's not good.  It would
> > be nicer if it just didn't let me type in a value like that.
> >
> > _______________________________________________
> > Dojo FAQ: http://dojo.jot.com/FAQ
> > Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
> > [hidden email]
> > http://dojotoolkit.org/mailman/listinfo/dojo-interest
> _______________________________________________
> Dojo FAQ: http://dojo.jot.com/FAQ
> Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
> [hidden email]
> http://dojotoolkit.org/mailman/listinfo/dojo-interest
>


--
-Karl Tiedt
_______________________________________________
Dojo FAQ: http://dojo.jot.com/FAQ
Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest



--
Jesse Kuhnert
Tacos/Tapestry, team member/developer

Open source based consulting work centered around dojo/tapestry/tacos/hivemind.
_______________________________________________
Dojo FAQ: http://dojo.jot.com/FAQ
Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: FW: Feature Request: Pure JS Input Masks

David Lee Perish
In reply to this post by Nguyen, Tom
I see your point there with not wanting to do very strict validation on
masks.  However, I believe that adding some loose validation would greatly
improve the usability of the controls.

While there would be a good amount of code required for leap year checks, we
know that (mm/dd) should never exceed (12/31).  So if (mm >= 13) or (dd >=
32) then focus/select should be sufficient to prompt the user to an error.

Another example on the date box masked with (mm/dd/yyyy) is a simple fix to
allow two as well as four digit years:

        var theDate = new Date(document.txtDate.value);
        if (theDate.getFullYear() <= 1980) {
                theDate.setFullYear(theDate.getFullYear() + 100);
                document.txtDate.value value = shortDateString(endDate);
        }

Is the consensus that validation should be an all or nothing scenario, or is
there room for a few simple hacks as my examples above?

-David Lee Perish


-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Nguyen, Tom
Sent: Tuesday, July 11, 2006 10:15 PM
To: [hidden email]
Subject: RE: [Dojo-interest] FW: Feature Request: Pure JS Input Masks

I've done a lot of thinking on this date/time masking a long time go and
here is my conclusion:

If you think about it, restricting user input of date and time mask is
more like input validation and not masking.  Masking/format allow user
friendly input, we only want to help the user by providing mask/format
that meets our requirement.  We don't want to anger the user with too
much restriction.

Strict Date and Time MASKING is hard to do even on desktop application.
I'm not saying that it's impossible, but it's not worth it...  It's also
not efficient...

Why is it hard?
Simple scenario:
        I'm a user trying to enter 02/29/2007.  So what would masking do
in this situation after I type in the number 7 in year 2007?  Is
02/29/2007 a valid input?  If you are wondering, I had to look at my
calendar to make sure that this is an invalid input before I set out to
discuss this example.  You are probably doing the same?   But then we
are programmer, it's not hard for us to check for this date in code
right?  So what do we do to tell the user that the input is invalid?  

Put yourself in the user shoe:

        1.  Clear the entire input?  

If you are the user, you would be annoyed.  Why the heck did this thing
clear my input?  I'm going to report this as a bug.  

        2.  Simple!  Change the day from 29 to 28?

Not as simple as you think: You would have to have extra logics for
month with different max days: 28, 29, 30, and 31 days.  That's just the
tip of the icebergs...

Of course, we can do it the lazy way by reset the day to 00.  This could
anger your user because they will have to use the mouse to the day
position so they can change the value.

Simple: why don't we move it for them?  This is not as easy as you think
and can lead to user being angry at you.

So on and so on...

        3.  Don't let the user enter the number 7?  Would it make you
mad if you are on a roll and something is restricting you?  Of the top
of your head, would you know that 2007 is not a leap year?  I had to
spend time go lookup the date in the calendar.

Same thing goes for time.  You have 24 hours, 60 hours, 60 minutes, 60
seconds and so on...  Too many criteria just to strictly mask it when
you really mean Validation!

Also, we are/should be validating it.  There is no need for the
complication.  You can go as far as separating Month, Day, Year to
different controls, but that's even harder to input.

And why mask when you have DateTimePicker?  You want to improve user
experience right?  Especially for the fast typers who don't like to use
the mouse.

So, in conclusion, we don't want to confuse Masking and Validation.
Validation makes it easier, fast typers don't have to worry about
correcting it until they are ready.  Users can continue to input their
data and go back to fix it when they are ready.

Regards,

Tom Nguyen
Sr. Developer

Phewwwwww!!!  That was a long email.  I know, I know.  I'm a bit wordy.

> -----Original Message-----
> From: [hidden email] [mailto:dojo-interest-
> [hidden email]] On Behalf Of Bill Keese
> Sent: Tuesday, July 11, 2006 7:06 PM
> To: [hidden email]
> Subject: Re: [Dojo-interest] FW: Feature Request: Pure JS Input Masks
>
> Nguyen, Tom wrote:
> > I wrote this a long time ago, before I discovered dojo...
> >
> >
> > http://www.noogen.net/download/free/MaskedProviderDemo.htm
> >
> > It has been tested it in IE and Firefox.  Check it out and see if it
> > could be something that could be refactor into a widget for dojo.
> > First, I would have to send in the signed CLA hehe....
>
> I like it; I haven't looked at the code at all but the functionality
> seems nice.  Would complement the other form widgets.
>
> I didn't understand the floating pane / tooltip discussion.  The
> validation widgets print an error message to the right of the input
> field.  If you did want to pop something up I would think it would be
an
> alert() or the Dialog widget.
>
> Karl Tiedt wrote:
> > Well there is need for validating  ;)  25:64:93 isnt a valid 24hr
time

> ;)
>
> I tried inputting this value.  It lets me.  That's not good.  It would
> be nicer if it just didn't let me type in a value like that.
>
> _______________________________________________
> Dojo FAQ: http://dojo.jot.com/FAQ
> Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
> [hidden email]
> http://dojotoolkit.org/mailman/listinfo/dojo-interest
_______________________________________________
Dojo FAQ: http://dojo.jot.com/FAQ
Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest

--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.10/384 - Release Date: 7/10/2006
 

--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.10/384 - Release Date: 7/10/2006
 

_______________________________________________
Dojo FAQ: http://dojo.jot.com/FAQ
Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FW: Feature Request: Pure JS Input Masks

Rick Morrison-3
There are a number of problems with on-the-fly validation like this:

a) As pointed out, the contents of the control with often be in flux while a user is actively editing the control. For example, there may be temporarily two decimal points in a number, two consecutive slashes in a date, multiple left parentheses in a phone number, etc. etc. etc. These are transient states that often the user has no intention of leaving that way. For the control to force valid input at all instants in time and to have the cursor jumping to and fro can be very annoying.

b) This kind of keystroke-by-keystroke analysis can take a lot of rather heavy-handed code to enforce. Dojo is pretty big already. In addition, watching every keystroke and running big JS functions can often cause the browser to "drag it's foot" when entering text. Makes the app feel sluggish.

c) Often the user will have a personal preference for data entry in a certain format. For example, they may enter telephone numbers without parenthesis, or use spaces to delimit the parts of a date, or use commas, maybe in the wrong place when entering large numbers.

For all these reasons, seems to me it would be better to validate the field and apply any field formatting only AFTER the field is exited (ie. onblur/onchange).

Let me propose another model:

For example, to validate a date control:

  a) Let the user type whatever they want in the control

  b) onblur/onchange, get the control contents and try to interpret it as a date. This can be done using strict rules, or loose rules as seen in

 http://simon.incutio.com/archive/2003/10/06/betterDateInput

  c) If the input doesn't resolve to a date, mark the control as "in error" (how this is done is a subject for another topic).

  d) If the input DOES resolve to a date, replace the contents of the control with the date formatted according to the app's preference.


Same kind of pattern applies to phone numbers, currency, credit card numbers, etc.

This kind of technique accomplishes the same kind of validation as input masking, but is not so "in your face".

Rick



On 7/12/06, David Lee Perish <[hidden email]> wrote:
I see your point there with not wanting to do very strict validation on
masks.  However, I believe that adding some loose validation would greatly
improve the usability of the controls.

While there would be a good amount of code required for leap year checks, we
know that (mm/dd) should never exceed (12/31).  So if (mm >= 13) or (dd >=
32) then focus/select should be sufficient to prompt the user to an error.

Another example on the date box masked with (mm/dd/yyyy) is a simple fix to
allow two as well as four digit years:

        var theDate = new Date(document.txtDate.value);
        if (theDate.getFullYear() <= 1980) {
                theDate.setFullYear(theDate.getFullYear() + 100);
                document.txtDate.value value = shortDateString(endDate);
        }

Is the consensus that validation should be an all or nothing scenario, or is
there room for a few simple hacks as my examples above?

-David Lee Perish


-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Nguyen, Tom
Sent: Tuesday, July 11, 2006 10:15 PM
To: [hidden email]
Subject: RE: [Dojo-interest] FW: Feature Request: Pure JS Input Masks

I've done a lot of thinking on this date/time masking a long time go and
here is my conclusion:

If you think about it, restricting user input of date and time mask is
more like input validation and not masking.  Masking/format allow user
friendly input, we only want to help the user by providing mask/format
that meets our requirement.  We don't want to anger the user with too
much restriction.

Strict Date and Time MASKING is hard to do even on desktop application.
I'm not saying that it's impossible, but it's not worth it...  It's also
not efficient...

Why is it hard?
Simple scenario:
        I'm a user trying to enter 02/29/2007.  So what would masking do
in this situation after I type in the number 7 in year 2007?  Is
02/29/2007 a valid input?  If you are wondering, I had to look at my
calendar to make sure that this is an invalid input before I set out to
discuss this example.  You are probably doing the same?   But then we
are programmer, it's not hard for us to check for this date in code
right?  So what do we do to tell the user that the input is invalid?

Put yourself in the user shoe:

        1.  Clear the entire input?

If you are the user, you would be annoyed.  Why the heck did this thing
clear my input?  I'm going to report this as a bug.

        2.  Simple!  Change the day from 29 to 28?

Not as simple as you think: You would have to have extra logics for
month with different max days: 28, 29, 30, and 31 days.  That's just the
tip of the icebergs...

Of course, we can do it the lazy way by reset the day to 00.  This could
anger your user because they will have to use the mouse to the day
position so they can change the value.

Simple: why don't we move it for them?  This is not as easy as you think
and can lead to user being angry at you.

So on and so on...

        3.  Don't let the user enter the number 7?  Would it make you
mad if you are on a roll and something is restricting you?  Of the top
of your head, would you know that 2007 is not a leap year?  I had to
spend time go lookup the date in the calendar.

Same thing goes for time.  You have 24 hours, 60 hours, 60 minutes, 60
seconds and so on...  Too many criteria just to strictly mask it when
you really mean Validation!

Also, we are/should be validating it.  There is no need for the
complication.  You can go as far as separating Month, Day, Year to
different controls, but that's even harder to input.

And why mask when you have DateTimePicker?  You want to improve user
experience right?  Especially for the fast typers who don't like to use
the mouse.

So, in conclusion, we don't want to confuse Masking and Validation.
Validation makes it easier, fast typers don't have to worry about
correcting it until they are ready.  Users can continue to input their
data and go back to fix it when they are ready.

Regards,

Tom Nguyen
Sr. Developer

Phewwwwww!!!  That was a long email.  I know, I know.  I'm a bit wordy.

> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]

> [hidden email]] On Behalf Of Bill Keese
> Sent: Tuesday, July 11, 2006 7:06 PM
> To: [hidden email]
> Subject: Re: [Dojo-interest] FW: Feature Request: Pure JS Input Masks
>
> Nguyen, Tom wrote:
> > I wrote this a long time ago, before I discovered dojo...
> >
> >
> > http://www.noogen.net/download/free/MaskedProviderDemo.htm
> >
> > It has been tested it in IE and Firefox.  Check it out and see if it
> > could be something that could be refactor into a widget for dojo.
> > First, I would have to send in the signed CLA hehe....
>
> I like it; I haven't looked at the code at all but the functionality
> seems nice.  Would complement the other form widgets.
>
> I didn't understand the floating pane / tooltip discussion.  The
> validation widgets print an error message to the right of the input
> field.  If you did want to pop something up I would think it would be
an
> alert() or the Dialog widget.
>
> Karl Tiedt wrote:
> > Well there is need for validating  ;)  25:64:93 isnt a valid 24hr
time

> ;)
>
> I tried inputting this value.  It lets me.  That's not good.  It would
> be nicer if it just didn't let me type in a value like that.
>
> _______________________________________________
> Dojo FAQ: http://dojo.jot.com/FAQ
> Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
> [hidden email]
> http://dojotoolkit.org/mailman/listinfo/dojo-interest
_______________________________________________
Dojo FAQ: http://dojo.jot.com/FAQ
Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest

--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.10/384 - Release Date: 7/10/2006


--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.10/384 - Release Date: 7/10/2006


_______________________________________________
Dojo FAQ: http://dojo.jot.com/FAQ
Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest


_______________________________________________
Dojo FAQ: http://dojo.jot.com/FAQ
Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: FW: Feature Request: Pure JS Input Masks

Nguyen, Tom
In reply to this post by David Lee Perish

Agreed!  As I’ve said earlier, there are many issues with strict masking which you’ve pointed out here.  But we can’t really be strictly on one direction.   Masking has its advantages and for something simple as restricting only numeric to be entered is not that bad on performance.  If you don’t have masking, you would have to do a lot of work with validation.  Of course, you should always validate, especially on the server side to prevent hacks…

A lot of work is what?  Say you made a typo (maybe you have disability issue) with 12c3a45 in your number and you really want 12345.  Now as programmer, you we want to take it as 12 or 45?  Or do we replace the value as 12345?  This often happen with cut and paste issues.  Another example is “O1234”.   Did you catch that? I didn’t type in the number 0 but the letter O. 

What if we are entering a series of number?  i.e.  “713232343”,  Regular user cannot tell if that’s a complete phone number or social security number.  I don’t want to have to tab off to see my number reformatted so I can read it.  These days, we have input that are longer than that such as 128bit IP addresses.

FYI, don’t forget about re-format onfocus and onload too.  Example:  we often save phone number without the dash or “(“ as in “7132323432” which is not user readable.  Of course we can do this on the server side, but we want to be consistence with our format.  So we want to use the format that we defined in the javascript.

Regards,

Tom Nguyen
Sr. Developer


From: [hidden email] [mailto:[hidden email]] On Behalf Of Rick Morrison
Sent: Wednesday, July 12, 2006 10:35 AM
To: [hidden email]
Subject: Re: [Dojo-interest] FW: Feature Request: Pure JS Input Masks

 

There are a number of problems with on-the-fly validation like this:

a) As pointed out, the contents of the control with often be in flux while a user is actively editing the control. For example, there may be temporarily two decimal points in a number, two consecutive slashes in a date, multiple left parentheses in a phone number, etc. etc. etc. These are transient states that often the user has no intention of leaving that way. For the control to force valid input at all instants in time and to have the cursor jumping to and fro can be very annoying.

b) This kind of keystroke-by-keystroke analysis can take a lot of rather heavy-handed code to enforce. Dojo is pretty big already. In addition, watching every keystroke and running big JS functions can often cause the browser to "drag it's foot" when entering text. Makes the app feel sluggish.

c) Often the user will have a personal preference for data entry in a certain format. For example, they may enter telephone numbers without parenthesis, or use spaces to delimit the parts of a date, or use commas, maybe in the wrong place when entering large numbers.

For all these reasons, seems to me it would be better to validate the field and apply any field formatting only AFTER the field is exited (ie. onblur/onchange).

Let me propose another model:

For example, to validate a date control:

  a) Let the user type whatever they want in the control

  b) onblur/onchange, get the control contents and try to interpret it as a date. This can be done using strict rules, or loose rules as seen in

 http://simon.incutio.com/archive/2003/10/06/betterDateInput

  c) If the input doesn't resolve to a date, mark the control as "in error" (how this is done is a subject for another topic).

  d) If the input DOES resolve to a date, replace the contents of the control with the date formatted according to the app's preference.


Same kind of pattern applies to phone numbers, currency, credit card numbers, etc.

This kind of technique accomplishes the same kind of validation as input masking, but is not so "in your face".

Rick


On 7/12/06, David Lee Perish <[hidden email]> wrote:

I see your point there with not wanting to do very strict validation on
masks.  However, I believe that adding some loose validation would greatly
improve the usability of the controls.

While there would be a good amount of code required for leap year checks, we
know that (mm/dd) should never exceed (12/31).  So if (mm >= 13) or (dd >=
32) then focus/select should be sufficient to prompt the user to an error.

Another example on the date box masked with (mm/dd/yyyy) is a simple fix to
allow two as well as four digit years:

        var theDate = new Date(document.txtDate.value);
        if (theDate.getFullYear() <= 1980) {
                theDate.setFullYear(theDate.getFullYear() + 100);
                document.txtDate.value value = shortDateString(endDate);
        }

Is the consensus that validation should be an all or nothing scenario, or is
there room for a few simple hacks as my examples above?

-David Lee Perish


-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Nguyen, Tom
Sent: Tuesday, July 11, 2006 10:15 PM
To: [hidden email]
Subject: RE: [Dojo-interest] FW: Feature Request: Pure JS Input Masks

I've done a lot of thinking on this date/time masking a long time go and
here is my conclusion:

If you think about it, restricting user input of date and time mask is
more like input validation and not masking.  Masking/format allow user
friendly input, we only want to help the user by providing mask/format
that meets our requirement.  We don't want to anger the user with too
much restriction.

Strict Date and Time MASKING is hard to do even on desktop application.
I'm not saying that it's impossible, but it's not worth it...  It's also
not efficient...

Why is it hard?
Simple scenario:
        I'm a user trying to enter 02/29/2007.  So what would masking do
in this situation after I type in the number 7 in year 2007?  Is
02/29/2007 a valid input?  If you are wondering, I had to look at my
calendar to make sure that this is an invalid input before I set out to
discuss this example.  You are probably doing the same?   But then we
are programmer, it's not hard for us to check for this date in code
right?  So what do we do to tell the user that the input is invalid?

Put yourself in the user shoe:

        1.  Clear the entire input?

If you are the user, you would be annoyed.  Why the heck did this thing
clear my input?  I'm going to report this as a bug.

        2.  Simple!  Change the day from 29 to 28?

Not as simple as you think: You would have to have extra logics for
month with different max days: 28, 29, 30, and 31 days.  That's just the
tip of the icebergs...

Of course, we can do it the lazy way by reset the day to 00.  This could
anger your user because they will have to use the mouse to the day
position so they can change the value.

Simple: why don't we move it for them?  This is not as easy as you think
and can lead to user being angry at you.

So on and so on...

        3.  Don't let the user enter the number 7?  Would it make you
mad if you are on a roll and something is restricting you?  Of the top
of your head, would you know that 2007 is not a leap year?  I had to
spend time go lookup the date in the calendar.

Same thing goes for time.  You have 24 hours, 60 hours, 60 minutes, 60
seconds and so on...  Too many criteria just to strictly mask it when
you really mean Validation!

Also, we are/should be validating it.  There is no need for the
complication.  You can go as far as separating Month, Day, Year to
different controls, but that's even harder to input.

And why mask when you have DateTimePicker?  You want to improve user
experience right?  Especially for the fast typers who don't like to use
the mouse.

So, in conclusion, we don't want to confuse Masking and Validation.
Validation makes it easier, fast typers don't have to worry about
correcting it until they are ready.  Users can continue to input their
data and go back to fix it when they are ready.

Regards,

Tom Nguyen
Sr. Developer

Phewwwwww!!!  That was a long email.  I know, I know.  I'm a bit wordy.

> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]
> [hidden email]] On Behalf Of Bill Keese
> Sent: Tuesday, July 11, 2006 7:06 PM
> To: [hidden email]
> Subject: Re: [Dojo-interest] FW: Feature Request: Pure JS Input Masks
>
> Nguyen, Tom wrote:
> > I wrote this a long time ago, before I discovered dojo...
> >
> >
> > http://www.noogen.net/download/free/MaskedProviderDemo.htm
> >
> > It has been tested it in IE and Firefox.  Check it out and see if it
> > could be something that could be refactor into a widget for dojo.
> > First, I would have to send in the signed CLA hehe....
>
> I like it; I haven't looked at the code at all but the functionality
> seems nice.  Would complement the other form widgets.
>
> I didn't understand the floating pane / tooltip discussion.  The
> validation widgets print an error message to the right of the input
> field.  If you did want to pop something up I would think it would be
an
> alert() or the Dialog widget.
>
> Karl Tiedt wrote:
> > Well there is need for validating  ;)  25:64:93 isnt a valid 24hr
time
> ;)
>
> I tried inputting this value.  It lets me.  That's not good.  It would
> be nicer if it just didn't let me type in a value like that.
>
> _______________________________________________
> Dojo FAQ: http://dojo.jot.com/FAQ
> Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
> [hidden email]
> http://dojotoolkit.org/mailman/listinfo/dojo-interest
_______________________________________________
Dojo FAQ: http://dojo.jot.com/FAQ
Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest

--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.10/384 - Release Date: 7/10/2006


--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.10/384 - Release Date: 7/10/2006


_______________________________________________
Dojo FAQ: http://dojo.jot.com/FAQ
Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest

 


_______________________________________________
Dojo FAQ: http://dojo.jot.com/FAQ
Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FW: Feature Request: Pure JS Input Masks

Bill Keese-2
Wow, this is all very complicated.  Sorry I won't be able to participate
much in the discussion but I hope we come up with a good solution (by
solution I mean working code, not just a decision about what to do)

On the fly formatting is very nice because otherwise users will get
confused typing in a long string like a phone number.

About on the fly correction, like Tom said it doesn't work well with
dates and leap years.  In some cases it seems like it would be useful
though.  Not sure.
_______________________________________________
Dojo FAQ: http://dojo.jot.com/FAQ
Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest
12
Loading...