Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

list box?

Posted on 2001-06-05
4
Medium Priority
?
146 Views
Last Modified: 2010-04-09
Hi,
I want to launch a window from a page. This new page has a combo box. The initial page has an empty combo box. How can I place the selected option from the new page into the empty combo box of the original page!
Cheers
0
Comment
Question by:spunog
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 8

Expert Comment

by:edemcs
ID: 6156818
I believe you would have to use a Dynamic Language such as ASP or ColdFusion.
0
 
LVL 9

Accepted Solution

by:
nimaig earned 800 total points
ID: 6156886
/**************** save this as opened.html **********************/

<html>
<head>

<script language="JavaScript">
     function updateParent(currObj){
          if(opener){
               var value = currObj.options[currObj.selectedIndex].value;
               var text = currObj.options[currObj.selectedIndex].text;
               opener.addOption(text,value);
          }
     }
</script>
</head>
<body>
<form>
<select name="sel1" onChange="updateParent(this)">
<option value="1">One</option>
<option value="2">two</option>
<option value="3">three</option>
<option value="4">four</option>
</select>

</form>
</body>
</html>

/***************** save this as test.html*******************/

<html>
<head>

<script language="JavaScript">
     function addOption(text,value){
          var obj = document.forms[0].sel1;
          obj.options[obj.length]=new Option(text,value);
     }
     function openChild(){
          window.open("opened.html");
     }
</script>
</head>
<body>
<form>
<select name="sel1">

</select>
<input type="button" onClick="openChild()" value="open">
</form>
</body>
</html>


/***************** and run test.html*******************/
0
 
LVL 8

Expert Comment

by:edemcs
ID: 6156944
I believe you would have to use a Dynamic Language such as ASP or ColdFusion.
0
 

Author Comment

by:spunog
ID: 6156977
Cheers, thats perfect !
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

596 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question