Josh,
>Actually, there currently isn't a programmatic way to set the value
>and have it be masked automagically for the developer. I just wanted
>to see if I could hook into existing methods to keep from having to
>add too much syntax. It's driven off of focus,blur,keypress and
>pasting(on cert
Actually, there currently isn't a programmatic way to set the value
and have it be masked automagically for the developer. I just wanted
to see if I could hook into existing methods to keep from having to
add too much syntax. It's driven off of focus,blur,keypress and
pasting(on certain browsers
>That's kind of what I was thinking. I was hoping that their might be
>a better way.
I'd advise against doing that by default. I suppose you could add it as
config option for those users that might not have any control over how the
field is being updated.
I would think that would be exception
That's kind of what I was thinking. I was hoping that their might be
a better way.
On Jun 12, 3:43 pm, "Dan G. Switzer, II" <[EMAIL PROTECTED]>
wrote:
> Josh,
>
> >My goal was to detect a val() call from within my masked input plugin.
>
> >So, when someone says "$("#id").maskedinput('(999) 999-9
Josh,
>My goal was to detect a val() call from within my masked input plugin.
>
>So, when someone says "$("#id").maskedinput('(999) 999-')" , I
>would love to be able to detect when that value had been set
>programatically and then re-check the masking.
The only way I know to do that, would
Dan G. Switzer, II wrote:
Josh,
One more quick thing, is it possible to attach this to the val() of a
single input, or am I limited to extending this globally?
Instead of calling the below method "val" call it something else--like
"valChange()" or something. Then just call that new method an
My goal was to detect a val() call from within my masked input plugin.
So, when someone says "$("#id").maskedinput('(999) 999-')" , I
would love to be able to detect when that value had been set
programatically and then re-check the masking.
So, if someone does a "$("#id").val('555-867-5309'
Josh,
>One more quick thing, is it possible to attach this to the val() of a
>single input, or am I limited to extending this globally?
Instead of calling the below method "val" call it something else--like
"valChange()" or something. Then just call that new method any time you want
the change e
>Thank you. Any idea how I could attach to regular javascript call like
>" x.value='something' "?
You're not going to be able to do that in any kind of cross-browser way.
Just use a jQuery method/plug-in.
-Dan
One more quick thing, is it possible to attach this to the val() of a
single input, or am I limited to extending this globally?
On Jun 12, 2:44 pm, "Dan G. Switzer, II" <[EMAIL PROTECTED]>
wrote:
> Josh,
>
> >I was just wondering, should a val() call invoke a change event? If
> >not, is there a
Thank you. Any idea how I could attach to regular javascript call like
" x.value='something' "?
On Jun 12, 2:44 pm, "Dan G. Switzer, II" <[EMAIL PROTECTED]>
wrote:
> Josh,
>
> >I was just wondering, should a val() call invoke a change event? If
> >not, is there a good way to emulate this behavio
Josh,
>I was just wondering, should a val() call invoke a change event? If
>not, is there a good way to emulate this behavior.
You could overwrite the default behavior:
$.fn.extend({
val: function( val ) {
return val == undefined ?
( this.length
12 matches
Mail list logo