Results 1 to 4 of 4

Thread: get value from other form field**resolved**

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2001
    Location
    asia
    Posts
    87

    Question get value from other form field**resolved**

    the story is...

    i have 2 form

    form1 : contain some link that will popup form2,and 1 textbox field

    form2: contain a list of menu or listbox that user can choose value from

    the problem is that : i want to create some event that will send value from listbox/menubox from form2 to form1 textbox field.

    eg: user chose option 1 from listbox/menubox from form2 and automatically that value will be send to form1 textbox field.

    ..please anybody!
    Last edited by ZUWARI; Jan 4th, 2003 at 09:36 PM.

  2. #2
    Frenzied Member Rick Bull's Avatar
    Join Date
    Apr 2002
    Location
    England
    Posts
    1,444
    Something like this?
    Code:
    <form id="form1" action="..."><p>
      <input name="text1" />
    </p></form>
    <form id="form2" action="..."><p>
      <select onchange="document.forms['form1'].text1.value = this.options[this.selectedIndex].value;">
        <option value="value1">Value 1</option>
        <option value="value2">Value 2</option>
        <option value="value3">Value 3</option>
      </select>
    </p></form>
    If you want the text of the option change "value" for "text" in the onchange event-handler.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Oct 2001
    Location
    asia
    Posts
    87
    thanks i will tried it out then..

    will replies back..

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Oct 2001
    Location
    asia
    Posts
    87
    okie it work...

    thanks Rick Bull !

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