?
Solved

need a target _parent

Posted on 2005-05-04
2
Medium Priority
?
672 Views
Last Modified: 2011-09-20
Hi there,

I'm having a dropdown menu go to a location on the "onchange" event... it is within an iframe.

<select name="Price" style="width: 155px;" onchange="if (this.selectedIndex > 0) location.href=this[this.selectedIndex].value;">
<option value="portfolio.php?id=21>Portfolio 21</option>
<option value="portfolio.php?id=23>Portfolio 23</option>
<option value="portfolio.php?id=23>Portfolio 23</option>
</select>

How can I make this go to the _parent window?
0
Comment
Question by:toddynho
2 Comments
 
LVL 32

Accepted Solution

by:
Batalf earned 200 total points
ID: 13928128
by specifying parent in your javascript

i.e.

<select name="Price" style="width: 155px;" onchange="if (this.selectedIndex > 0) parent.location.href=this[this.selectedIndex].value;">

you can also use "top" instead of "parent". top refers to the top most window.

Batalf
0
 

Author Comment

by:toddynho
ID: 13928428
thanks!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
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…
Suggested Courses

864 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