Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-05-2006, 01:58 AM   PM User | #1
mie2cod
New to the CF scene

 
Join Date: Dec 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
mie2cod is an unknown quantity at this point
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>
mie2cod is offline   Reply With Quote
Old 12-05-2006, 03:03 AM   PM User | #2
brandonH
Regular Coder

 
Join Date: Oct 2003
Location: on a ship
Posts: 574
Thanks: 1
Thanked 6 Times in 5 Posts
brandonH is on a distinguished road
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.
brandonH is offline   Reply With Quote
Old 12-05-2006, 07:37 AM   PM User | #3
mie2cod
New to the CF scene

 
Join Date: Dec 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
mie2cod is an unknown quantity at this point
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.
mie2cod is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:31 PM.


Advertisement
Log in to turn off these ads.