HTML Drop Down Box

Posted on 2005-05-15
Last Modified: 2012-06-21
I am using a Drop-Down Box to navagate users on my web site.  This code bellow works great but i would like the link to open in a different frame (main) not default frame.  

Is there something I can add to this code to enable the link to open in the "main" frame?
<input type="button" onclick="location = ''+document.ex2.xfer.options[document.ex2.xfer.selectedIndex].value;" value="Go" />

Here is all the code
<base target="main">
<form name="ex2" method="POST">
<div align="center">
<select name="xfer" size="1">
<option value="cp/Scripts/ASP/chat/default.asp" target="main">Chat</option>
<option value="index-2.html">Message Board</option>
<option value="photoalbum/index.htm">Photo Album</option>
<option value="video/index.html">Video</option>
<input type="button" onclick="location = ''+document.ex2.xfer.options[document.ex2.xfer.selectedIndex].value;" value="Go" />
Question by:cgriffith4
    LVL 1

    Accepted Solution


    ie try:
    <input type="button" onclick="parent.main.location = ''+document.ex2.xfer.options[document.ex2.xfer.selectedIndex].value;" value="Go" />


    Author Comment

    AWESOME Thanks!

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Join & Write a Comment

    Suggested Solutions

    Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit ( and similar technologies have enjoyed wide adoption, making it possib…
    Accessibility and Usability are two concepts that seem to be closely related.  But, too many people seem to have a distorted perception of them. During last five years, those two words have come to the day-to-day work of almost every web develope…
    This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
    The viewer will learn how to count occurrences of each item in an array.

    746 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

    15 Experts available now in Live!

    Get 1:1 Help Now