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. AJAX textchange event then click event

AJAX textchange event then click event

Scheduled Pinned Locked Moved Web Development
debugginghelp
3 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.
  • C Offline
    C Offline
    CandyMe
    wrote on last edited by
    #1

    Hi, I'm using AJAX. I have a textbox and a button inside an updatepanel. I have textboxtext changed event for the textbox and a click event for the button. When I input a text inside the textbox without removing the cursor inside it then click the button, and perform debug, only the textchange event gets executed, while it doesn't execute code inside click event. Please help. I can't simply force call click event inside textchange event of my textbox. Thank you.

    Gerri

    S 1 Reply Last reply
    0
    • C CandyMe

      Hi, I'm using AJAX. I have a textbox and a button inside an updatepanel. I have textboxtext changed event for the textbox and a click event for the button. When I input a text inside the textbox without removing the cursor inside it then click the button, and perform debug, only the textchange event gets executed, while it doesn't execute code inside click event. Please help. I can't simply force call click event inside textchange event of my textbox. Thank you.

      Gerri

      S Offline
      S Offline
      Shog9 0
      wrote on last edited by
      #2

      CandyMe wrote:

      I'm using AJAX.

      You're using ASP.NET AJAX - so you might get better answers by posting in the ASP.NET forum (no guarantees though...)

      CandyMe wrote:

      I have a textbox and a button inside an updatepanel.

      The focus change (and thus, the textchange event) happens before the click, so that's what you'll get first. You might want to re-think your strategy a bit - why would you need a text change event when there's a perfectly good button to let you know when the user's done?

      every night, i kneel at the foot of my bed and thank the Great Overseeing Politicians for protecting my freedoms by reducing their number, as if they were deer in a state park. -- Chris Losinger, Online Poker Players?

      C 1 Reply Last reply
      0
      • S Shog9 0

        CandyMe wrote:

        I'm using AJAX.

        You're using ASP.NET AJAX - so you might get better answers by posting in the ASP.NET forum (no guarantees though...)

        CandyMe wrote:

        I have a textbox and a button inside an updatepanel.

        The focus change (and thus, the textchange event) happens before the click, so that's what you'll get first. You might want to re-think your strategy a bit - why would you need a text change event when there's a perfectly good button to let you know when the user's done?

        every night, i kneel at the foot of my bed and thank the Great Overseeing Politicians for protecting my freedoms by reducing their number, as if they were deer in a state park. -- Chris Losinger, Online Poker Players?

        C Offline
        C Offline
        CandyMe
        wrote on last edited by
        #3

        It's because I have a customvalidation. I would like to prompt the user of invalid input without having to click the button yet. I have other controls in the form as well. Thank you.

        Gerri

        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