Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Jul 2003
    Posts
    601
    Thanks
    17
    Thanked 0 Times in 0 Posts

    Dynamically Adding/Remove Rows with Field Validation

    Hey All,

    I'm trying to dynamically add and remove phone number fields, while providing validation/masking on them at the same time. I have two examples that each do part of this, but I'm struggling to get them to work together. To start:

    http://mcdesigninc.com/jquery/test.html

    - This example works for the phone validation. The problem is the remove button only removes the most-recent row added. I need to have a remove button next to each input field and be able to remove each one independently.

    http://mcdesigninc.com/jquery/sample.html

    - This doesn't have the masking/validation, but it does the add/remove just as needed. The issue is my first example is using .append to create much of what's going on (and adding the .mask to each input field), where the second example is using .clone.

    I'd like to integrate the masking into the second example, but have been struggling to do so.

    Any help would be greatly appreciated.

    Thanks.

  • #2
    Regular Coder
    Join Date
    Jul 2003
    Posts
    601
    Thanks
    17
    Thanked 0 Times in 0 Posts
    Okay, I've gotten it nearly-working, except in IE.

    http://mcdesigninc.com/jquery/sample2.html

    The above example works in FF and Chrome, but in IE, the fifth input field doesn't allow for input of a number - instead replacing the first input field. I'm have a little trouble figuring out what's going on here.

    Any ideas? Thanks in advance all.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •