index of a value?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Shisou
    New Member
    • Jul 2007
    • 52

    index of a value?

    I'm trying to program a repetitive character validation for a form on my site. I was wondering if it was possible for js to get the characters in a input.value individually... i was thinking something like
    Code:
    input.value.index(i)
    but that doesn't seem to be working... any suggestions?
    Last edited by Shisou; Mar 31 '08, 10:24 PM. Reason: code tags
  • Logician
    New Member
    • Feb 2007
    • 210

    #2
    Originally posted by Shisou
    I was wondering if it was possible for js to get the characters in a input.value individually
    Code:
    input.value[i];
    // or 
    input.value.charAt(i);

    Comment

    • Shisou
      New Member
      • Jul 2007
      • 52

      #3
      Originally posted by Logician
      Code:
      input.value[i];
      // or 
      input.value.charAt(i);

      hmmm i knew there had to be some way to do it!

      I test this tomorrow, thanks so much!!

      Comment

      • Shisou
        New Member
        • Jul 2007
        • 52

        #4
        hmmm

        So i tried the input.value[i] first but it didn't seem to evaluate right in my if statement. Not sure why, but the input.value.cha rAt(i) works like a charm!

        Thanks again!

        Comment

        Working...