Solved

Pull Down Menu (Combo button) - Onclick to IFrame

Posted on 2004-04-15
3
1,074 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
JavaScript export function not working in IE 15 49
jQuery Validate 4 36
jQuery delay animation 3 28
Best Way to remove the port from a URL? 15 32
When you need to keep track of a simple list of numbers or strings, the Array object is your most direct tool.  As we saw in my earlier EE Article (http://www.experts-exchange.com/A_3488.html), typical array handling might look like this: (CODE) B…
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…
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…

813 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now