Results 1 to 2 of 2
  1. #1

    Open these links in parent window?

    Hi have a script that is a dropdown box that goes to all these links on my website. I want to include it on the pages listed using iframe, but when i do that, it opens it in the same frame. How do i modify this code so that it opens in the parent frame?

    <style type="text/css">
    .nochoice {color: blue;}
    .choice {color: black; }
    <script type="text/javascript">
    function redirect(pulldown)
    newlocation = pulldown[pulldown.selectedIndex].value;
    if (newlocation != "")
    self.location = newlocation;
    function resetIfBlank(pulldown)
    possiblenewlocation = pulldown[pulldown.selectedIndex].value;
    if (possiblenewlocation == "")
    pulldown.selectedIndex = 0; // reset to start since no movement
    <form name="navForm" id="navForm" action="redirector.cgi" onsubmit="return false">
    <label> Sites:
    <select name="menu" id="menu" onchange="resetIfBlank(this)">
    <option value="" class="choice" selected" selected></option>
    <option value="" class="choice" selected" selected>Classifieds - buy and sell</option>
    <input type="submit" value="Go" onclick="redirect(; return
    false;" />&nbsp;
    Note* I took out most of the links. I left a couple in for an exameple. So basically, i want the links to open in the parent frame.

  2. #2
    Join Date
    Aug 2004

    Just use: = url;

    and you'll get what you wanted. Note that I didn't read your code, but I know what I just past worked for me (in both IE and FF).

    GPLHost:>_ open source hosting worldwide (I'm founder, CEO & official Debian Developer)
    Servers & our leading control panel and our Xen VPS hosting, which are already included in Debian and Ubuntu
    Available in: Kuala Lumpur, Singapore, Sydney, Seattle, Atlanta, Paris, London, Barcelona, Zurich, Israel

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts