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. Textbox ontextChanged event is not triggered...

Textbox ontextChanged event is not triggered...

Scheduled Pinned Locked Moved ASP.NET
helpjavascripttutorial
6 Posts 5 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.
  • M Offline
    M Offline
    madhan_mss
    wrote on last edited by
    #1

    Hi, i have two textboxes to enter the start and end dates. I am using javascript calendar to populate these text boxes. Based on the chosen date values, i need to filter a treeview control. The problem is, the ontextchanged event of the textbox is not firing, when the date is chosen from the javascript calendar. If you enter the date directly into the textbox, the event is firing. I need to find out how to fire the ontextchanged event when the date is chosen from the javascript calendar. Please help. Madhan.

    M E N 3 Replies Last reply
    0
    • M madhan_mss

      Hi, i have two textboxes to enter the start and end dates. I am using javascript calendar to populate these text boxes. Based on the chosen date values, i need to filter a treeview control. The problem is, the ontextchanged event of the textbox is not firing, when the date is chosen from the javascript calendar. If you enter the date directly into the textbox, the event is firing. I need to find out how to fire the ontextchanged event when the date is chosen from the javascript calendar. Please help. Madhan.

      M Offline
      M Offline
      Muhammad Gouda
      wrote on last edited by
      #2

      madhan_mss wrote:

      how to fire the ontextchanged event when the date is chosen from the javascript calendar.

      onTextChange fires only in case of editing the textbox by hand Instead, you can put your code on SelectionChanged event of the calendar

      Mohamed Gouda Egypt

      M 1 Reply Last reply
      0
      • M Muhammad Gouda

        madhan_mss wrote:

        how to fire the ontextchanged event when the date is chosen from the javascript calendar.

        onTextChange fires only in case of editing the textbox by hand Instead, you can put your code on SelectionChanged event of the calendar

        Mohamed Gouda Egypt

        M Offline
        M Offline
        madhan_mss
        wrote on last edited by
        #3

        The calendar is a javascript. I am unable to trigger this event due to this. Is there any other way to achive this?..

        1 Reply Last reply
        0
        • M madhan_mss

          Hi, i have two textboxes to enter the start and end dates. I am using javascript calendar to populate these text boxes. Based on the chosen date values, i need to filter a treeview control. The problem is, the ontextchanged event of the textbox is not firing, when the date is chosen from the javascript calendar. If you enter the date directly into the textbox, the event is firing. I need to find out how to fire the ontextchanged event when the date is chosen from the javascript calendar. Please help. Madhan.

          E Offline
          E Offline
          eyeseetee
          wrote on last edited by
          #4

          just as a point maybe you should use asp.net calendar control javascript can be disabled at the client end

          C 1 Reply Last reply
          0
          • M madhan_mss

            Hi, i have two textboxes to enter the start and end dates. I am using javascript calendar to populate these text boxes. Based on the chosen date values, i need to filter a treeview control. The problem is, the ontextchanged event of the textbox is not firing, when the date is chosen from the javascript calendar. If you enter the date directly into the textbox, the event is firing. I need to find out how to fire the ontextchanged event when the date is chosen from the javascript calendar. Please help. Madhan.

            N Offline
            N Offline
            newc1
            wrote on last edited by
            #5

            I take it the JS calendar is being displayed via a standard onclick event linked to an image or button? If that is the case then simply populate a global variable with the current date (textbox values) prior to displaying the calendar and then add logic after the calendar has closed to call a function thats checks if the date has changed and then filter the treeview accordingly. Manipulating DOM elements directly through JS does not fire DOM events.

            Clean code is the key to happiness.

            1 Reply Last reply
            0
            • E eyeseetee

              just as a point maybe you should use asp.net calendar control javascript can be disabled at the client end

              C Offline
              C Offline
              Christian Graus
              wrote on last edited by
              #6

              Most people don't use that because it sucks, javascript ones are much nicer.

              Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

              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