1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Write text box input from one form to a hiiden field in another

Discussion in 'JavaScript' started by cmc@savycat.com, Jan 30, 2007.

  1. #1
    How do I write a text box input from one form to a hidden field in another form?

    <form name='form1' action='' method='post'>
    <input type='text' name='text1' value=''>
    </form>

    <form name='form2' action='' method='post'>
    <input type='hidden' name='hidden1' value='form1.text1'>
    </form>
     
    cmc@savycat.com, Jan 30, 2007 IP
  2. rays

    rays Active Member

    Messages:
    563
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    58
    #2
    try this code ...


    <form name='form1' action='' method='post'>
    <input type='text' name='text1' value='' onkeyup="document.getElementById('hidden1').value = this.value " >
    </form>

    <form name='form2' action='' method='post'>
    <input type='hidden' id ="hidden1'" name='hidden1' value='form1.text1'>
    </form>
    Reply With Quote
     
    rays, Jan 30, 2007 IP