?
Solved

list box?

Posted on 2001-06-05
4
Medium Priority
?
143 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

WordPress Tutorial 3: Plugins, Themes, and Widgets

The three most common changes you will make to your website involve the look (themes), the functionality (plugins), and modular elements (widgets).

In this article we will briefly define each again, and give you directions on how to install them.

Question has a verified solution.

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

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
Suggested Courses

752 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