input box...auto update....

Discussion in 'Javascript' started by Gerard, Sep 23, 2005.

  1. Gerard

    Gerard Guest

    Hi All,
    I have 2 input box on my form...i would like input box #2 to be
    updated automatically onces data entry in input box #1 is completed.

    I would be greatful if some could guide me through this. I'm a php guy
    with little javascript knowledge.

    Regards,
    Gerard.
    Gerard, Sep 23, 2005
    #1
    1. Advertising

  2. Gerard <> wrote:

    > I have 2 input box on my form...i would like input box #2 to be
    > updated automatically onces data entry in input box #1 is completed.


    <input type="text" onchange="updateBox2()">
    <input type="text" id="box2">

    and somewhere in your script:

    function updateBox2() {
    document.getElementById( 'box2' ).value="whatever you want";
    }

    --
    Christopher Benson-Manica | I *should* know what I'm talking about - if I
    ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
    Christopher Benson-Manica, Sep 23, 2005
    #2
    1. Advertising

  3. Gerard

    Gerard Guest

    Thanks much...i'll try this out
    Gerard, Sep 23, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ashutosh
    Replies:
    3
    Views:
    8,992
    Andrew Thompson
    Jun 16, 2005
  2. Gnarlodious
    Replies:
    4
    Views:
    17,586
    elizas
    May 5, 2010
  3. cjl
    Replies:
    1
    Views:
    10,496
    Michael Winter
    Oct 31, 2005
  4. linkswanted
    Replies:
    1
    Views:
    901
  5. cjl
    Replies:
    7
    Views:
    179
    Thomas 'PointedEars' Lahn
    Oct 30, 2005
Loading...

Share This Page