Results 1 to 3 of 3

Thread: Splitting and Checking for a character RESOLVED

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2005
    Posts
    300

    Resolved Splitting and Checking for a character RESOLVED

    Ok, a coursemate of mine is trying to do the following.

    He has an input box where the user types their surname.

    But if the user types their surname as

    O'hara or Smith-taylor

    then he needs to correct it, so its becomes O'Hara and Smith-Taylor.

    so if the name contains a "-" or a " ' " then it needs to split it at that point and make the next character a Capital.

    the code he has so far is

    Code:
    if (!nameSplit[0].match(lnameCheck) || !nameSplit[1].match(lnameCheck)) {
    alert("Correct lname format is: Smith OR Oh-Hara")
    document.forms[0].submit.disabled = true
    document.forms[0].lname.focus()
    return false
    }
    and he said has to be something with

    Code:
    onblur="function"
    hope this is clear as i know nothing bout JavaScript my mate has no internet access at the moment.
    Last edited by Ricky1; Feb 10th, 2006 at 12:27 PM.
    Im Learning !!!!

Posting Permissions

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



Click Here to Expand Forum to Full Width