Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Javascript Code Comparing Two textbox's value

Javascript Code Comparing Two textbox's value

Scheduled Pinned Locked Moved ASP.NET
javascripthelpquestion
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rummer
    wrote on last edited by
    #1

    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

    A D J 3 Replies Last reply
    0
    • R rummer

      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

      A Offline
      A Offline
      Amit Kushwaha
      wrote on last edited by
      #2

      Use CompareValidator with dialog mode

      Regards... - Amit Kushwaha

      1 Reply Last reply
      0
      • R rummer

        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

        D Offline
        D Offline
        deezZ
        wrote on last edited by
        #3

        <!-- 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.

        1 Reply Last reply
        0
        • R rummer

          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

          J Offline
          J Offline
          joindotnet
          wrote on last edited by
          #4

          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 } }

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups