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 2002
    Posts
    362
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Substitute entry value

    I have a Cold Fusion search form entry that doesnt want "0" as a beginning number. From earlier post I was shown how to handle this with an alert message. Now, I was wondering if I can eliminate this "0" entry? Basically substitute the entry and make the "0" go away so when the number 03 is entered it will be entered as 3 in my search form.

    But can I do this in Javascript? If so how because I dont see anything in my books.

    Code:
    if(num.charAt(0)=="0"){
    alert('there is a zero as first char')
    //can I eliminate or take away the "0" entry here?? ...like a substitute command such as:
    s/0//;
    }

  • #2
    Regular Coder
    Join Date
    Jul 2003
    Location
    Massachusetts
    Posts
    472
    Thanks
    0
    Thanked 0 Times in 0 Posts


  •  

    Posting Permissions

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