PDA

View Full Version : combo link box wipper ..help!


ace6190
02-05-2003, 10:24 PM
I placed the drop down menu in a frame page but I dont want the
links to open in its own frame.
Just wanted to know how to make the links in the drop down open in a diff frame besides its own ..

BrightNail
02-06-2003, 04:41 AM
well, you have to use javascript...

ala

function goto_URL(object) {
whichUrl=object.options[object.selectedIndex].value;
if(whichUrl=="ok"){
};
else{ window.parent.main.location.href = whichUrl;}
}



<FORM>
&nbsp;<SELECT NAME="selectName" onChange="goto_URL(this.form.selectName)">
<OPTION VALUE="ok">Quick Links
<OPTION VALUE="ok">*********
<OPTION VALUE="faq.html">FAQ
<OPTION VALUE="ratings/choose.html">Ratings
<OPTION VALUE="amazonbooks.html">Buy Books
</SELECT>
</FORM>

this line...sub in "your frame name" for 'main'

else{ window.parent.main.location.href = whichUrl;}

ace6190
02-06-2003, 05:10 PM
Dude I app your help but Im dumber than a box of rocks when it comes to Java , I guess I'm just over my head...Im sry I wasted your time =(

BrightNail
02-07-2003, 12:57 AM
huh?

you didn't waste my time at all..I get help here constantly...no worries...

put that function below the "title" tags in your html document....

<script language="javascript">
function goto_URL(object) {
whichUrl=object.options[object.selectedIndex].value;
if(whichUrl=="ok"){
};
else{ window.parent.main.location.href = whichUrl;}
}
</script>


then, have your drop down similiar to the one below...just put in your links/values...

<FORM>
<SELECT NAME="selectName" onChange="goto_URL(this.form.selectName)">
<OPTION VALUE="ok">Quick Links
<OPTION VALUE="ok">*********
<OPTION VALUE="faq.html">FAQ
<OPTION VALUE="ratings/choose.html">Ratings
<OPTION VALUE="amazonbooks.html">Buy Books
</SELECT>
</FORM>


and remember to change the frame name in the function like I mentioend in the previous post

ace6190
02-07-2003, 02:23 AM
I truly app your help but im still stumped....
I use front page to work on my web page.
my page is set up with 4 frames ..

I will try my best to explain how my page is setup.

the main html file is called Index ...

the frames I have are named as ...header = "top frame" html file in this frame =header.htm

leftmenu ="left side frame" html file in this frame = leftmenu.htm

main = "middle frame" html file in this frame = main.htm

rightmenu = "right side frame" html file for this frame = rightmenu.htm
-----------------------------------------------------

Hope I did not confuse you to much with that mess=)

I have the drop down menu's in the "leftmenu"frame
I want the links to open in the "main"frame..

ware im lost at is which html file do I edit ? the one with the drop down menu ="leftmenu" or the frame I want the links to open in ="main"... as u can see I not very good at this. If you want I can send the html files to you if think that would be any help..

thank you for the help ...im very sry if im being a pain and if you dont want to help any more I understand
:(

glenngv
02-07-2003, 02:51 AM
in the page where the combo box is:

<html>
<head>
<script language="javascript">
function goto_URL(object) {
whichUrl=object.options[object.selectedIndex].value;
if(whichUrl!="ok") window.open(whichURL,"main");
</script>
</head>
<body>
<form>
<select name="selectName" onChange="goto_URL(this)">
<option value="ok">Quick Links</option>
<option value="ok">*********</option>
<option value="faq.html">FAQ</option>
<option value="ratings/choose.html">Ratings</option>
<option value="amazonbooks.html">Buy Books</option>
</select>
</form>
</body>
</html>

ace6190
02-07-2003, 11:23 PM
Ok I tried but i messed it up some how ... man Im missing somthing ...
----------------------------------------------------------------------------------
so if this is any help here is the code from my page the wiper is in
-----------------------------------------------------------------------------------

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>LeftMenu</title>
<base target="main">
</head>

<body bgcolor="#000000">

<div align="center">
<center>
<table border="1" width="86%" height="67" bordercolor="#666666" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" height="21" bgcolor="#808080">
<p align="center"><font face="Broadband ICG" size="2" color="#000000"><b>Winston
Cup League</b></font></td>
</tr>
<tr>
<td width="100%" height="34" bordercolor="#666666"><form name="a564" target="main">
<p>-<a href="http://" target="main"><select name="a918" size="1">
<option selected value="http://www.redlineracingleague.net/standings/Standings.htm">Standings</option>
<option value="http://www.redlineracingleague.net/Results/Results.htm">Race
Results</option>
<option value="http://www.redlineracingleague.net/Schedule.Schedule.htm">Schedule</option>
<option value="http://www.redlineracingleague.net/Driversinfo/Driversinfo.htm">Drivers
Info</option>
<option value="http://www.redlineracingleague.net/Rules/Rules.htm">Rules</option>
</select> <input type="button" value="Go"
onClick="location=document.a564.a918.options[document.a564.a918.selectedIndex].value"></a></p>
</form></td>
</tr>
</table>
</center>
</div>
<hr>
<div align="center">
<center>
<table border="1" width="88%" height="64" bordercolor="#666666" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" height="14" bgcolor="#808080">
<p align="center"><font face="Broadband ICG" size="2" color="#000000"><b>IROC
League</b></font></td>
</tr>
<tr>
<td width="100%" height="38"><form name="e880">
<p align="center"><select name="Iroc" size="1">
<option selected value="http://www.redlineracingleague.net/IROCstandings/IROC/Standings/IROC_Standings.htm"> Standings</option>
<option value="http://www.redlineracingleague.net/IROC/Results/IROC_Results"> Race
Results</option>
<option value="http://www.redlineracingleague.net/IROC/Schedule/Iroc_Schedule"> Schedule</option>
<option value="http://www.redlineracingleague.net/IROC/Rules/Rules.htm"> Rules</option>
<option value="http://www.redlineracingleague.net/Setups/IROCSetups.htm">Setups</option>
</select>
<input type="button" value="Go"
onClick="location=document.e880.e517.options[document.e880.e517.selectedIndex].value"></p>
</form></td>
</tr>
</table>
</center>
</div>

<hr>
<div align="center">
<center>
<table border="1" width="88%" height="63" bordercolor="#666666" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" height="14" bgcolor="#808080">
<p align="center"><font face="Broadband ICG" size="2" color="#000000"><b>Online
Racing Links</b></font></td>
</tr>
<tr>
<td width="100%" height="37"></td>
</tr>
</table>

</center>
</div>
<hr>
<div align="center">
<center>
<table border="1" width="88%" height="138" bordercolor="#666666" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" height="14" bgcolor="#808080" align="center">
<p align="center"><font face="Broadband ICG" size="2" color="#000000"><b>Manufator
Point Standings</b></font></td>
</tr>
<tr>
<td width="100%" height="112" align="center">
<table border="1" width="100%" bordercolor="#C0C0C0" cellspacing="0" cellpadding="0" bgcolor="#FFFFCC" height="110">
<tr>
------------------------------------------------------------------------------------
sry guys nothing you are doing wrong its just Im over my head ..thx for your help