Why not allow pasting, but remote non-numbers from pasted text via regex?

-- Yehuda

On 10/6/06, Sam Collett < [EMAIL PROTECTED]> wrote:
On 06/10/06, Sam Collett < [EMAIL PROTECTED]> wrote:
> On 05/10/06, Rafael Santos <[EMAIL PROTECTED]> wrote:
> > Sam, doesn't it should accept Paste cmd?
>
> Pasting should only work on the 1st and third input boxes and the textarea.
>
> I have only tested on Windows and needs more work - you can still
> paste with Shift-Ins (that should be easy to fix) and
> right-click/paste (not sure how to prevent that) - unless you are
> using IE (paste is disabled no matter how you try to paste).
>
> I don't know what the keyboard shortcut is for paste on a Mac is (or
> rather, I don't know the ASCII codes and event properties to check).
>

Apart from IE, there seems no reliable way to disable pasting across
all browsers (and I have no way of testing on Safari), so this feature
has been removed (although the code is still available for download if
anyone can figure a way to do it).

However, it now validates the entry (on blur) and runs a callback
function (if supplied) when there is a problem.

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/



--
Yehuda Katz
Web Developer | Wycats Designs
(ph)  718.877.1325
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to