#1
  1. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Posts
    173
    Rep Power
    13

    How to fire the event when readonly textbox value change?


    Hi

    I have a readonly textbox which store the date pick from a built-in datepicker function. I want to fire an event when the value in the readonly textbox change. How can i achived this since i cannot fire the event from the datepicker?

    I have tried onBlur,onChange but it cannot achived what i want.

    Any idea?Thanks.
    Last edited by et_me; May 3rd, 2006 at 11:52 PM.
    If you can dream it, you can create it; if you can believe it, you can become it. --Anon
  2. #2
  3. Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2004
    Location
    INDIA
    Posts
    394
    Rep Power
    0
    store the value of the text box in a variable set by the datepicker. store the new values in a different variable, now compare the two variables, if not equal then fire an event.. use javascript for this, compare the values of the text box and not the onClick kind of things in your case...
  4. #3
  5. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Posts
    173
    Rep Power
    13
    Thanks for the reply.

    I have successfully store the value into a variable. But when should i call the javascript function to compare the the two value? What is to be triggered to call the function?

    Thanks.
    If you can dream it, you can create it; if you can believe it, you can become it. --Anon
  6. #4
  7. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Posts
    173
    Rep Power
    13
    Hi

    I use the setTimeout to trigger the compare function. It did works.
    Not sure got any side effect yet.
    Thanks.
    If you can dream it, you can create it; if you can believe it, you can become it. --Anon
  8. #5
  9. Contributing User
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Aug 2005
    Location
    Bucharest ROMANIA
    Posts
    2,557
    Rep Power
    605
    Originally Posted by et_me
    Hi
    How can i achived this since i cannot fire the event from the datepicker?
    Why not?

IMN logo majestic logo threadwatch logo seochat tools logo