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
    Feb 2007
    Posts
    217
    Thanks
    25
    Thanked 1 Time in 1 Post

    dot behind characters

    Hi, Is there a way to place a dot behind every alphabetic character in a textfield? For example if someone enters 'LJPM' I want it too become 'L.J.P.M.'

    Which coding can I use for this?

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    17,924
    Thanks
    203
    Thanked 2,531 Times in 2,509 Posts
    <form name = "myform">
    <input type = "text" name = "thisField" size = "40" onchange = "addDots(this)">
    </form>

    <script type = "text/javascript">
    function addDots(which) {
    var dotsAdded = which.value.replace(/([A-z])/g,"$1.");
    alert (dotsAdded); // delete after testing
    }

    </script>


  •  

    Posting Permissions

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