PDA

View Full Version : targeting a frame using a drop-down


donovanm
09-13-2001, 07:26 AM
can i target a frame using this drop down menu??

I've tried adding 'target="framename"' but this doesn't seem to work.

here is the code:

<form style="display:inline">
<select onChange="if(this.selectedIndex!=0) self.location=this.options[this.selectedIndex].value">
<option value="" selected>Jump to Section
<option value="photos_home.html">------2001------</option>
<option value="photos/2001/chall_18.html">Chall's 18th</option>
<option value="photos/2001/ed_party.html">Ed's St P Party</option>
<option value="photos/2001/newyear2001.html">New Year 2001</option>
<option value="photos_home.html">------2000------</option>
<option value="photos/2000/rob_bday.html">Robi's 18th</option>
<option value="photos/2000/squelch_bday.html">Squelchy's</option>
<option value="photos/2000/18bday.html">My 18th</option>
<option value="photos/2000/pot_curry.html">Mr. T. Porter's Curry</option>
<option value="photos/2000/ben_civy.html">Ben's Civy Night</option>
<option value="photos_home.html">------1999------</option>
<option value="photos/1999/mill.html">Millenium Night</option>
<option value="photos/1999/17bday.html">My 17th B-day</option>
<option value="photos/1999/year11.html">End Of Year 11</option>
<option value="photos/1999/5thball.html">5th Year Ball</option>
<option value="photos_home.html">------misc------</option>
<option value="photos/misc/misc.html">Miscellaneous</option>
<option value="photos/misc/school_series.html">The School Series</option>
<option value="photos/misc/jess.html">Jess</option>
</select>
</form>

thanks
matt

Dr. Web
09-13-2001, 01:25 PM
thats because in the javascript it says self.location which means the current frame. I'll try to work this out...

Jon Hanlon
09-13-2001, 07:36 PM
Try this:

<select onChange="if(this.selectedIndex!=0) parent.frames.otherFrame.location=this.options[this.selectedIndex].value">

Where 'otherFrame' is the name of the target frame.
ie. <frame name='otherFrame'>