hai! i am trying to check a character with another character which are in the same text box.
when we are entering date,date in the first text box and month in another text box and year in another text box.
now i want when i am trying to enter '0'in the character position when there is '0' at first character position it must raise an alert box as well as when i am trying to enter a digit greater than '1' at 2nd character position it must raise an alert box when there is '3' in the first character position.
plz solve my problem if anyone as early as possible it must be urgent to me

Hi
You can use javascript charAt() method to check the character in textbox.Some thing like this

var str = "any thing";
for(var i = 0;i < str.length;i++){
    if(str.charAt(i) == ' '){
          // Do some action
    }
}

Hope this helps

Thanks

thank u sir!!!!

Hi
You can use javascript charAt() method to check the character in textbox.Some thing like this

var str = "any thing";
for(var i = 0;i < str.length;i++){
    if(str.charAt(i) == ' '){
          // Do some action
    }
}

Hope this helps

Thanks

rty 1111vbfghfghfhInline Code Example Here

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.