Javascript Code Comparing Two textbox's value
-
i ve take two textboxes so i want to compare both textboxes value and print a message that value not same like this with javascript so plz help me soon?????? thanks and regards vivek
Use CompareValidator with dialog mode
Regards... - Amit Kushwaha
-
i ve take two textboxes so i want to compare both textboxes value and print a message that value not same like this with javascript so plz help me soon?????? thanks and regards vivek
<!-- function checkEmail() { if (document.TheForm.Email.value != document.TheForm.EmailVerify.value) { alert ('The email addresses do not match. Please re-enter.') return false; } } //>
Use the code and change the control anmes as required in your page, and then call the function on the click of the button. -
i ve take two textboxes so i want to compare both textboxes value and print a message that value not same like this with javascript so plz help me soon?????? thanks and regards vivek
You can use this: function CompareValues() { var textBox1=document.GetElementById('ID_OF_TextBox1'); var textBox2=document.GetElementById('ID_OF_TextBox2'); if(textBox1.value!=textBox2.vale) { //do what you want } }