2 Replies Latest reply on Oct 7, 2011 3:59 AM by dtm-1979

    How to check that given text-field is BLANK?

    srinivas1506 Level 1

      Hello,

       

      My requirement is as below,

       

      if ( my_text_field_1 == BLANK){ 

       

      my_text_field_2.rawValue = "Blank"

       

      }

       

      if( my_text_field_1 = null){

       

      my_text_field_3.rawValue = "NULL"

       

      }

       

      1) Pls. let me know How can do Java script

       

      for this BLANK? is it a single space like " " (single space)...........if so, if user enters 2 spaces or 3 or 4 spaces, wht happens in that case? still my code works? or will it not work bcz we put only one space?

       

      2) Pls. consolidated the above JavaScript in a best practice way

       

      Thank you