Results 1 to 7 of 7

Thread: [RESOLVED]onChange event of a textbox to refresh another field help...

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Dec 2004
    Posts
    69

    Resolved [RESOLVED]onChange event of a textbox to refresh another field help...

    G'day,
    Yep I'm new to javascript and I'm trying to refresh field2 when the textbox contents of field1 change. If I use this code:

    _doClick('$Refresh', this, '_self', '#_RefreshKW_DateCheck')

    it works when I click on the textbox and does refresh the field but how do you have it automatically refresh field2 when the contents of field1 change?
    I'm looking for something other than _doClick I guess. Is there an _onChange?

    BTW, the contents of the field1 (date field) are populated when the user selects a date from a date picker and then field1 is populated with something like 11/06/2006 and when this happens I want field2 (another hidden field) to refresh

    Thanks alot for any help

    Kidd
    Last edited by TheKidd554; Nov 8th, 2006 at 08:17 AM. Reason: Resolved

  2. #2
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    Re: onChange event of a textbox to refresh another field help...


  3. #3

    Thread Starter
    Lively Member
    Join Date
    Dec 2004
    Posts
    69

    Re: onChange event of a textbox to refresh another field help...

    Thanks for the reply,
    I have the onChange event but I'm not sure what to put in the event as javascript that will tell the other field to refresh.

    Thanks

    Kidd

  4. #4
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: onChange event of a textbox to refresh another field help...

    Well, that is entirely dependent on what you mean by refresh, and thus we really can't help you with it unless you provide more information.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Dec 2004
    Posts
    69

    Re: onChange event of a textbox to refresh another field help...

    I think what is happening is that when the date field is populated using the date picker, it doesn't see it as an 'onChange' event which is why the other field won't refresh. The other field (field2) has Lotus Formula in it that looks up info in a view in a database to see if the date (that was populated in field1) exists. If it does then field2 returns "True" else "False"
    I can't figure out why when field1 is populated with a date, the onChange event doesn't fire.

    Kidd

  6. #6
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: onChange event of a textbox to refresh another field help...

    If it is indeed programmatically changed by settings its value property, the change event won't fire. Make the date picker fire the event. (There are various techniques for this - the simplest and most cross-browser is to just call the update function manually )
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Dec 2004
    Posts
    69

    Re: onChange event of a textbox to refresh another field help...

    Thanks cornedbee. Thats what I tried and it works fine.
    Thanks for your help

    Kidd

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width