PDA

View Full Version : Dropdown Menu and Iframes help



kca4christ
09-16-2006, 05:58 AM
I run a site for alumni of a campus organization of the college I went to. I have a drop down menu of registered alumni and what I would like to do is when the Submit button is clicked, have the selected person's profile open in an iframe right below in a different table cell.

Is there any way to make this happen? Here is the code I am working with.....
______________

<FORM>
<p align="center">
<SELECT NAME="alumni" SIZE=10>
<option value="aaugustin.htm">Amy Augustin
<option value="ahartz.htm">Adam Hartz</option>
<option value="abacon.htm">Amy Bacon</option>
<option value="abolds.htm">Amy Bolds (Thomspon)</option>
<option value="amcmullin.htm">Andrea McMullin</option>
<option value="acleveland.htm">Ashley Cleveland</option>
<option value="alawrence.htm">Ashley Lawrence</option>
<option value="bhunter.htm">Ben Hunter</option>
<option value="bbacon.htm">Bob Bacon</option>
<option value="bvanbecelaere.htm">Bobby Vanbecelaere</option>
<option value="bdudenhoeffer.htm">Brent Dudenhoeffer</option>
<option value="theevanss.htm">Brian &amp; Stacey Evans</option>
<option value="bwilliams.htm">Brooke Williams</option>
<option value="bhornsby.htm">Bryan Hornsby</option>
<option value="ckeller.htm">Christie Keller (Schwieter)</option>
<option value="clawrence.htm">Coleen Lawrence (Arnold)</option>
<option value="ddoerflinger.htm">Dan Doerflinger</option>
<option value="dsavage.htm">Daniel Savage</option>
<option value="dclear.htm">Deanna Clear</option>
<option value="ebell.htm">Erin Bell (Whitecotton)</option>
<option value="jhowell.htm">Jaime Howell</option>
<option value="jking.htm">Jaime King</option>
<option value="jgordinier.htm">Janelle Gordinier (Gravitt)</option>
<option value="jwright.htm">Jenna Wright (Moehle)</option>
<option value="jhoulehan.htm">Jennifer Houlehan</option>
<option value="jbade.htm">Jeremy Bade</option>
<option value="jlawrence.htm">John Lawrence</option>
<option value="jleffler.htm">John Leffler</option>
<option value="jcrawford.htm">Judi Crawford (Culler)</option>
<option value="kparker.htm">Kara Parker</option>
<option value="kgray.htm">Kathy Gray</option>
<option value="kdudenhoeffer.htm">Katrina Dudenhoeffer (Wilson)</option>
<option value="kashcraft.htm">Kevin Ashcraft</option>
<option value="kschlanger.htm">Kim Schlanger</option>
<option value="kharrison.htm">Kyle Harrison</option>
<option value="lreynolds.htm">Lucas Reynolds</option>
<option value="lbrown.htm">Lana Brown</option>
<option value="lfaust.htm">Laura Faust</option>
<option value="ldefries.htm">Lori Defries</option>
<option value="thenoyds.htm">Luke &amp; Shelley Noyd</option>
<option value="mlquicks.htm">Mark &amp; Liz Quick</option>
<option value="mcleveland.htm">Matt Cleveland
<option value="thequicks.htm">Matt &amp; Romelia Quick</option>
<option value="mclemons.htm">Molly Clemons (Knobbe)</option>
<option value="mcarr.htm">Monica Carr (Strobel)</option>
<option value="ngriffith.htm">Nathan Griffith</option>
<option value="pwarner.htm">Penni Warner</option>
<option value="psherman.htm">Phillip Sherman</option>
<option value="rvoorhees.htm">Ronnie Voorhees</option>
<option value="sschultz.htm">Sara Schultz (Garrison)</option>
<option value="scox.htm">Sarah Cox (Sumrall)</option>
<option value="smiles.htm">Stacey Miles (Mills)</option>
<option value="sking.htm">Shawn King</option>
<option value="shawkins.htm">Stephanie Hawkins</option>
<option value="twoods.htm">Talia Woods (Gessley)</option>
<option value="thevangilders.htm">Tim &amp; Athena Vangilder</option>
<option value="tlarkin.htm">T.L. Larkin</option>
</SELECT>
</p>
<p align="center">
<INPUT TYPE="button" VALUE="Look Up" onClick="leapto(this.form)">
</p>
</FORM>
--------------------------------------------
that is in one table cell and in the cell right below, I have my iframe....

<iframe name="alumniprofile" height="400" width="300" align="center" src="aaugustin.htm">Your browser does not support inline frames or is currently configured not to display inline frames.</iframe>

obviously the bolded src value is what I need to be variable, depending on which profile is selected.

Any help is MUCH appreciated!

jscheuer1
09-17-2006, 05:23 AM
Replace this:


<SELECT NAME="alumni" SIZE=10>

with:


<select name="alumni" size="10" onchange="window.frames.alumniprofile.location.href=this.options[this.selectedIndex].value;">

kca4christ
09-23-2006, 09:37 PM
Thanks for the reply, but I am still having problems

I think the issue is the src in the iframe
<iframe name="alumniprofile" height="300" width="300" align="center" src="aaugustin.htm">

How do I get that to be a VARIABLE value?

jscheuer1
09-24-2006, 06:14 PM
I think the problem is:


<INPUT TYPE="button" VALUE="Look Up" onClick="leapto(this.form)">

I have no idea what function leapto() looks like. But, you shouldn't need it, the onchange event I wrote out for you will take care of it.

kca4christ
09-27-2006, 09:46 PM
Thanks a bunch for you help.....working like a charm now!