why you dont give a hint what the users have to input in this field: [ ] means input field
write: [EMAIL PROTECTED] and dont allow a dot as input (if the dot is not used in names) On Sep 26, 10:03 pm, Alex <[EMAIL PROTECTED]> wrote: > I was under the impression that the masked input plugin simply > provides a template for entry, but every character in that template is > still submitted, so I'd still have to strip the @domain part off > before submission. > > The other problem with the masked input is that it expects a fixed > width input, and our usernames vary in length from 1 to 32 characters, > so the masked plugin is much better used for things like phone, > serial, and tracking numbers, or where the pattern of characters is of > a known length. > > On Sep 26, 12:53 pm, "Josh Nathanson" <[EMAIL PROTECTED]> wrote: > > > You could the masked input plugin, so that they couldn't enter periods or > > @'s in the first place. It's really nice. > > >http://jquery.com/plugins/project/maskedinput > > > -- Josh > > > ----- Original Message ----- > > From: "Alex" <[EMAIL PROTECTED]> > > To: "jQuery (English)" <jquery-en@googlegroups.com> > > Sent: Wednesday, September 26, 2007 11:46 AM > > Subject: [jQuery] Stripping domain from email > > > > Situation: I've a username and password field, which I want to submit > > > to different systems depending on the submit button they choose. Now, > > > since I can't convince the programmers to edit their side of things, > > > that leaves me with 3 separate forms which have different input names. > > > I'm silently copying the username and password to the two form inputs > > > I'm hiding (leaving their submit buttons visible) using jQuery. > > > > Because I want to eliminate errors as much as possible, I'm looking to > > > strip out things that people tend to do in their inputs just before I > > > submit (yes, once again because the programmers don't want to edit > > > *their* validation). When asked for their username, people tend to > > > enter their email address or some variation thereof. I'd like to > > > submit ONLY the first half of such an entry. > > > > e.g.: > > > > [EMAIL PROTECTED] --> user > > > [EMAIL PROTECTED] --> user > > > user.domain.com --> user > > > user.domain --> user > > > > Here's the code I'm using to silently copy the input, and it's > > > probably just before this copy that the username stripping should > > > occur: > > > > jQuery("#user_webmail").blur( > > > function(){ > > > > jQuery("#user_pay,#user_home").val(jQuery("#user_webmail").val()).focus().blur(); > > > } > > > ); > > > > Any help would be appreciated.