View Full Version : Targeting my dropdown menu to an iframe

06-18-2007, 07:09 PM
I'm having a heck of a time getting this drown down to open in an iframe that's name "window1". (I want the content called by the play button to open in "window1". Although the play button is not required for what I want.)

I know all the links that are currently in this are for music. I'm wanting to use it on another page, that calls up html pages with embedded wmv files into the window1 iframe.

Anybody have a suggestion?

Here's a link to my test page:

Here's the dropdown code from that page:

<form name="VideoMenu">

<select name="example" size="3.5" style="width:185" width="175px" border="0" onChange="redirect(this.options.selectedIndex)"><font size=-2><option>Hanoverphist</option><option>Dave - ("Solo")<option>Rock</option><option>The Pimps</option><option>Earnhardt Tribute Songs</option><option>Comedy</option><option>Internet Radio</option></font></select>

<select name="stage2" size="4" style="width:275" width="275px" border color="#000000"><option value=""></option></select>

<input type="button" name="test" value="PLAY" onClick="go();window.focus()">


var groups=document.VideoMenu.example.options.length

var group=new Array(groups)

for (i=0; i<groups; i++)

group[i]=new Array()

group[0][0]=new Option("JrDesert","JrDesert.html")
group[0][1]=new Option("Shine - Collective Soul Cover","hanoverphistshine.wav")
group[0][2]=new Option("Eighteen - Alice Cooper Cover","eighteen.wav")
group[0][3]=new Option("Fly Me Courageous - Drivin&Cryin Cover","flymecourageous.wav")
group[0][4]=new Option("Just Go Away - Hanoverphist Original","justgoaway.wav")

group[1][0]=new Option("Acoustic Tune - Dave","acousticdaveone.wav")
group[1][1]=new Option("Blues Tune - Dave","bluesdave.wav")
group[1][2]=new Option("House of the Rising Son - Dave","risingsondavewav.wav")

group[2][0]=new Option("Do You Feel Like I Do - Peter Frampton","feellikeido.wav")
group[2][1]=new Option("Give a Little Bit - Supertramp","givealittlebit.wav")
group[2][2]=new Option("Fight The Good Fight - Triumph","goodfight.wav")
group[2][3]=new Option("Heaven & Hell - Black Sabbath","heavenandhell.wav")
group[2][4]=new Option("Little White Lies - Sammy Hagar","littlewhitelies.wav")
group[2][5]=new Option("Three Lock Box - Sammy Hagar","threelockbox.wav")
group[2][6]=new Option("United - Judas Priest","united.wav")
group[2][7]=new Option("What Ya Give - Tesla","whatyagivestudio.wav")
group[2][8]=new Option("When I'm Gone - 3 Doors Down","whenimgone.wav")
group[2][9]=new Option("The Road I'm On - 3 Doors Down","theroadimon.wav")
group[2][10]=new Option("Steve McQueen - Sheryl Crow","stevemcqueen.wav")

group[3][0]=new Option("Rocket Science (MI-2 Soundtrack)","rocketscience.wav")
group[3][1]=new Option("Sumpin'","sumpin.wav")
group[3][2]=new Option("El Presidente","elpresidente.wav")
group[3][3]=new Option("Hoss Vegas","hossvegas.wav")
group[3][4]=new Option("Rallo","rallo.wav")
group[3][5]=new Option("Grandma's Christmas Shirt","grandmasxmasshirt.wav")

group[4][0]=new Option("Angels In Waiting - Author Unknown","angelsinwaiting.wav")
group[4][1]=new Option("Dale Earnhardt Mix (WQYK)","daleearnhardtmixwqyk.wav")
group[4][2]=new Option("Elvis/Earnhardt Re-Mix","elvisfordaleearnhardt.wav")
group[4][3]=new Option("Last Lap/Freebird Re-Mix","lastlap_freebird.wav")
group[4][4]=new Option("Number Three - John Murley","numberthreebyjohnmurley.wav")
group[4][5]=new Option("Say Goodbye - Author Unknown","saygoodbye.wav")
group[4][6]=new Option("The Dance/Re-Mix - Garth Brooks","thedancedaleearnhardttribute.wav")

group[5][0]=new Option("Alice's Restaurant - Arlo Guthrie","alicesrestaurant.wav")
group[5][1]=new Option("Motorcycle Song - Arlo Guthrie","motorcyclesong.wav")
group[5][2]=new Option("The Dentist - Bill Cosby","dentist.wav")
group[5][3]=new Option("Who's On First - Abbott & Costello","whosonfirst.wav")
group[5][4]=new Option("Stupid People - Bill Engvall","stupidpeople.wav")

group[6][0]=new Option("BrainGell Radio - Live Heavy Metal","")

var temp=document.VideoMenu.stage2

function redirect(x){

for (m=temp.options.length-1;m>0;m--)


for (i=0;i<group[x].length;i++){

temp.options[i]=new Option(group[x][i].text,group[x][i].value)




function go(){





I hope I explained myself well enough.

Any help would be greatly appreciated.

Thanks in advance,


06-18-2007, 07:13 PM




making sure to change the id to your iframes id


06-18-2007, 07:30 PM
Thank you A1ien51. I figured it out just before your post. But I wanna say thanks for such a <i>speedy</i> reply! :)