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. Click Event not firing

Click Event not firing

Scheduled Pinned Locked Moved Web Development
helpquestion
4 Posts 2 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.
  • A Offline
    A Offline
    Abbas82
    wrote on last edited by
    #1

    Hello, I am working on a site with an input form that has required field validators. If the user doesn't enter something in one of the textboxes, the error message appears. When they enter something and: 1) goto another field on the form (the error message clears) then click OK, the click event fires as expected 2) click OK without focusing on another field, only the error message is cleared but the click event is never fired, hence forcing the user to click OK one more time to submit Any idea why this weird behaviour is happening? I tried it on a simple page with just a couple of textboxes and it worked fine, so I am not sure why this is acting differently? Any comments would be much appreciated.

    K 1 Reply Last reply
    0
    • A Abbas82

      Hello, I am working on a site with an input form that has required field validators. If the user doesn't enter something in one of the textboxes, the error message appears. When they enter something and: 1) goto another field on the form (the error message clears) then click OK, the click event fires as expected 2) click OK without focusing on another field, only the error message is cleared but the click event is never fired, hence forcing the user to click OK one more time to submit Any idea why this weird behaviour is happening? I tried it on a simple page with just a couple of textboxes and it worked fine, so I am not sure why this is acting differently? Any comments would be much appreciated.

      K Offline
      K Offline
      Kschuler
      wrote on last edited by
      #2

      The part you labeled 1) is how a validator is supposed to work. I'm assumming your problem is the 2) portion that is forcing the user to click twice. Do you have any other javascript on the page that is reacting to the textbox's onblur event or when it loses focus?

      A 1 Reply Last reply
      0
      • K Kschuler

        The part you labeled 1) is how a validator is supposed to work. I'm assumming your problem is the 2) portion that is forcing the user to click twice. Do you have any other javascript on the page that is reacting to the textbox's onblur event or when it loses focus?

        A Offline
        A Offline
        Abbas82
        wrote on last edited by
        #3

        I tried doing some searching through the source, but couldn't find any code I have written to do that. But then again, this is a site based on SharePoint, so there is some JavaScript I do not have access to. Although, I'd be surprised if it is a bug inherent in SharePoint.

        K 1 Reply Last reply
        0
        • A Abbas82

          I tried doing some searching through the source, but couldn't find any code I have written to do that. But then again, this is a site based on SharePoint, so there is some JavaScript I do not have access to. Although, I'd be surprised if it is a bug inherent in SharePoint.

          K Offline
          K Offline
          Kschuler
          wrote on last edited by
          #4

          Without knowing more about your website, it's hard to say where you can start looking for a solution. If I were you, I'd probably try adding and setting up a new button that does the same as the other button and seeing if it does the same thing if you click THAT button. That would tell you if it's code related to the validator or the button. Then try adding and setting up a new validator...maybe a setting got messed up in that. Hope this helps.

          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