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

12-05-2006, 01:58 AM

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

1) Index.html

function popup () {
//popup script

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

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>

12-05-2006, 03:03 AM
could you clarify what it is you are wnating a bit more. the above just confused me. lol

12-05-2006, 07:37 AM
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.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum