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
Solved

Pull Down Menu (Combo button) - Onclick to IFrame

Posted on 2004-04-15
3
1,076 Views
Last Modified: 2008-02-26
Hello, I have an inline frame (iframe) at the bottom of the page, on the top of the page i have a combo box, i want to make an onclick on one of the combo boxes that would change the destination in the iframe, if you can do this please let me know.


0
Comment
Question by:wd006451
  • 2
3 Comments
 
LVL 16

Accepted Solution

by:
jaysolomon earned 80 total points
ID: 10834966
<select onchange="window.frames['iframeName'].src = this.value;">
0
 
LVL 4

Assisted Solution

by:monolith_888
monolith_888 earned 45 total points
ID: 10835045
<script>
function changeDest()
  {
  var newDest = document.tf.cBox.options[document.tf.cBox.selectedIndex].text;
  myIFrame.location.href = "http://"+newDest+"/";
  }
</script>

<form name="tf">
<select name="cBox" onChange="changeDest()">
  <option>www.google.com</option>
  <option>www.yahoo.com</option>
  <option>www.experts-exchange.com</option>
</select>
</form>

<iframe src="about:blank" height="200" width="600" name="myIFrame"></iframe>
0
 
LVL 4

Assisted Solution

by:monolith_888
monolith_888 earned 45 total points
ID: 10835083
I like jaysolomon's way, but I changed it to:

<select onChange="window.frames['myIFrame'].location.href = this.options[selectedIndex].text;">
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

840 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