how to validate the text field

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kaleeswaran
    New Member
    • Mar 2007
    • 132

    how to validate the text field

    hi!
    now i am validating the field using alert.but instead of using alert method.i would like to alerting the user through changing text colur...
    how do i do that...
    give me some idea...
    thank you,
    kaleeswaran
  • hirak1984
    Contributor
    • Jan 2007
    • 316

    #2
    Originally posted by kaleeswaran
    hi!
    now i am validating the field using alert.but instead of using alert method.i would like to alerting the user through changing text colur...
    how do i do that...
    give me some idea...
    thank you,
    kaleeswaran

    say u have a input text box
    <input type="t1" value="" />
    in your javascript function use the following code:

    document.getEle mentById("t1"). style.backgroun d=#ffoooo;

    it should work

    Comment

    Working...