·
Added a discussion

Hello. rather than just having a list or categories in my Radio app I'm trying to add a dropdown with a list of Genres (categories).

It works fine but it opens in a new tab. How can I make this open in the same tab or window. Also I would like to have the selection box be to the right of "Choose Station by Genre" instead of below.


image_transcoder.php?o=sys_images_editor&h=55&dpx=1&t=1641069150


Below is my code...


<p>Choose Station by Genre:</p>


<form name="form1">

<select name="genre" id="genre">

 <option value="default">Select</option>

 <option value="/page/station-category?category=1">60s</option>

<option value="/page/station-category?category=2">70s</option>

<option value="/page/station-category?category=3">80s</option>

<option value="/page/station-category?category=4">90s</option>

<option value="/page/station-category?category=7">Alternative</option>

<option value="/page/station-category?category=11">Blues</option> 

<option value="/page/station-category?category=16">Christmas</option>

<option value="/page/station-category?category=18">Classic Rock</option>

<option value="/page/station-category?category=21">Comedy</option>

<option value="/page/station-category?category=24">Country</option> 

</select>

<script type="text/javascript">

 var urlmenu = document.getElementById( 'genre' );

 urlmenu.onchange = function() {

     window.open( this.options[ this.selectedIndex ].value );

 };

 </script>

  • 823
Comments
    Not logged in users can't 'Comments Post'.
    Info