Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Dec 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to pass value(from the same popup) to more than one text input.

    Hi.

    I have worked the following which pass value from popup to one text input:

    1) Index.html

    <script>
    function popup () {
    //popup script
    }
    </script>

    <form name="formname">
    <input type="text" name="input1"><a href="javascript:void()" onclick="javascript:popUp('Pop.html')">Select</a>
    </form>


    2) Pop.html

    <a href="javascript:void()" onclick="javascript:opener.document.formname.input1.value='Hello World!';self.close();">Hello World!</a>


    How to pass the value from the same popup to more than one input, so i won't have to write 10 pop-up for 10 input. For example;

    <input type="text" name="input1"><a href="javascript:void()" onclick="javascript:popUp('Pop.html')">Select</a>
    <input type="text" name="input2"><a href="javascript:void()" onclick="javascript:popUp('Pop.html')">Select</a>

  • #2
    Regular Coder
    Join Date
    Oct 2003
    Location
    on a ship
    Posts
    574
    Thanks
    1
    Thanked 6 Times in 5 Posts
    could you clarify what it is you are wnating a bit more. the above just confused me. lol
    I make no attempt at pretending like I'm a professional. I offer help with what knowledge I do have.

  • #3
    New to the CF scene
    Join Date
    Dec 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ok. I want to use the same pop up, to pass value into text input. Each input share the same pop up.

    For example:

    1) Index.html
    <input 1> <a>popUp</a>
    <input 2> <a>popUp</a>
    <input 3> <a>popUp</a>

    2) PopUp.html
    <a onclick="document.form[0].....value="aaa">AAA</a>
    <a onclick="document.form[0].....value="bbb">BBB</a>
    <a onclick="document.form[0].....value="ccc">CCC</a>


    Therefore, I can select either AAA, BBB, or CCC for input 1,
    AAA, BBB, or CCC for input 2, and the same goes for input 3.


  •  

    Posting Permissions

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