Loading ...
Sorry, an error occurred while loading the content.

How do you find button pushed for onChange event of a textbox?

Expand Messages
  • stephentexassmith
    I have a text field with an event of onchange= NewPasswordCheck2(); I use the event to validate that the passwords changes meet the right criteria. On the
    Message 1 of 1 , Oct 11, 2007
    • 0 Attachment
      I have a text field with an event of onchange="NewPasswordCheck2();"

      I use the event to validate that the passwords changes meet the
      right criteria. On the page I also have 2 buttons, a Submit button,
      and a Cancel button.

      I like the fact that if a person clicks on the Submit button after
      entering the passwords in the text field, then the onChange still
      fires and checks the passwords.

      However, I want to wrap the text validation inside the function with
      an IF statement checking to see if the Cancel button was pushed. I
      don't need the passwords to be checked if the Cancel button is what
      triggers the onChange event. I can quite and go to the previous
      page.

      How could I check in the javascript at the beginning of the
      NewPasswordCheck2() function to see if the Cancel button was pushed?

      Thanks,
      Stephen
    Your message has been successfully submitted and would be delivered to recipients shortly.