Help with HTML / Script Please

liunx

Guest
Hi,<br />
<br />
I am trying to get the Menu Script at the URL below to work with frames:<br />
<br />
<!-- m --><a class="postlink" href="http://a1javascripts.com/form_navigation/multidropmenu/multidropmenu.html">http://a1javascripts.com/form_navigatio ... pmenu.html</a><!-- m --><br />
<br />
I need the choices to open into the main window. Can someone give me a hand with this? It would be greatly appreciated.<br />
<br />
Thanks<br />
<br />
Debra<br />
<br />
Here is my current frame layout:<br />
<br />
<br />
</HEAD><br />
<frameset rows=12%,88% bordercolor=red><br />
<frame src=http://www.htmlforums.com/archive/index.php/header.html name=Top scrolling=no<br />
marginwidth=0 marginheight=0 noresize=yes><br />
<frame src=http://www.htmlforums.com/archive/index.php/main.html name=Main scrolling=auto<br />
marginwidth=0 marginheight=0 noresize=yes><br />
</frameset><br />
<noframes><br />
You need a frames capable browser to view this page.<br />
</noframes><br />
</HTML><br />
<br />
The Menu Script will be placed in the header.html file<!--content-->This code is your frameset (notice the bold parts):<br />
<br />
<br />
<!ENTITY % HTML.Version "-//W3C//DTD HTML 4.01 Frameset//EN"<br />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"<br />
"http://www.w3.org/TR/html4/frameset.dtd"><br />
<html><br />
<br />
<head><br />
<title>Your title</title><br />
</head><br />
<br />
<frameset border="false" frameborder="0" framespacing="0" rows="80,*,16"><br />
<frame name="top" scrolling="no" noresize src=http://www.htmlforums.com/archive/index.php/"top.html" target="contents"><br />
<frameset cols="125,*"><br />
<frame name="contents" src=http://www.htmlforums.com/archive/index.php/"nav.html" scrolling="auto" marginwidth="0" marginheight="0"<br />
noresize target="main"><br />
<frame name="main" src=http://www.htmlforums.com/archive/index.php/"main.html" scrolling="auto" marginwidth="10" noresize<br />
marginheight="17"><br />
</frameset><br />
<noframes><br />
<body bgcolor="#008000" text="#FFFFFF" topmargin="0" leftmargin="0"><br />
<table border="0" width="100%" height="100%"><br />
<tr><br />
<td width="100%"><p align="center"><font color="#FFFFFF">This page uses frames, but your<br />
browser does not support them. Please upgrade your browser</font></td><br />
</tr><br />
</table><br />
</body><br />
</noframes><br />
</frameset><br />
</html><br />
<br />
<br />
Put this code in the page you want the menu:<br />
<br />
<br />
<SCRIPT LANGUAGE=JavaScript><br />
<br />
<!--<br />
//Multi drop menu exhibited on A1 JavaScripts(www,a1javascripts.com)<br />
//All credit to the unknown author for this script<br />
//This will set up the two dimensional arrays to store your information<br />
<br />
menu=new Array()<br />
menu[0]=new Array()<br />
menu[1]=new Array()<br />
menu[2]=new Array()<br />
<br />
//This is where you populate your arrays with information<br />
//The first parameter is what gets displayed in the drop down<br />
//The second parameter is set to the value of the drop down<br />
<br />
menu[0][0]=new Option("A1 JavaScripts","http://www.a1javascripts.com")<br />
menu[0][1]=new Option("123Webmaster","http://www.123webmaster.com")<br />
menu[0][2]=new Option("FreeWebTemplates","http://www.freewebtemplates.com")<br />
<br />
menu[1][0]=new Option("FreewareFiles","http://www.freewarefiles.com")<br />
menu[1][1]=new Option("Httpcity","http://www.httpcity.com")<br />
menu[1][2]=new Option("Htmlforums","http://www.htmlforums.com")<br />
<br />
menu[2][0]=new Option("PerlAccess","http://www.perlaccess.com")<br />
menu[2][1]=new Option("1-Click-Clipart","http://www.1-click-clipart.com/")<br />
menu[2][2]=new Option("FontFiles","http://www.fontfiles.com/") <br />
<br />
function fillList(z){<br />
<br />
//This will loop through and erase the existing drop down<br />
for (a=document.f.s.options.length-1;a>0;a--){document.f.s.options[a]=null}<br />
<br />
//This will loop through and fill the drop down with the new information<br />
for (a=0;a<menu[z].length;a++){document.f.s.options[a]=new<br />
Option(menu[z][a].text,menu[z][a].value)<br />
}<br />
<br />
//This just puts the list back to the first option<br />
document.f.s.selectedIndex=0<br />
}<br />
//--><br />
<br />
</SCRIPT><br />
<br />
<!-- Keep this below code in case any errors happen --><br />
<script type="text/javascript" language="javascript"><br />
window.onerror = function(){return true;} <br />
</script><br />
<!-- Keep this above code in case any errors happen --><br />
<br />
</head><br />
<br />
<body><br />
<br />
<FORM NAME=f><br />
<br />
<!--// The number within the call to the fillList function determines which array will be used to fill in the list //--><br />
<br />
<A HREF=http://www.htmlforums.com/archive/index.php/Javascript:fillList(0)><IMG SRC=/images/menu1.gif alt=Menu1 width=100 height=50 border=0></A><br />
<br />
<A HREF=http://www.htmlforums.com/archive/index.php/Javascript:fillList(1)><IMG SRC=/images/menu2.gif alt=Menu2 width=100 height=50 border=0></A><br />
<br />
<A HREF=http://www.htmlforums.com/archive/index.php/Javascript:fillList(2)><IMG SRC=/images/menu3.gif alt=Menu3 width=100 height=50 border=0></A><br />
<br />
<BR><br />
<br />
<SELECT NAME=s style="width:200"><br />
<br />
<OPTION VALUE="#">What site do you want to visit?<br />
<br />
<OPTION VALUE="#"><br />
<br />
<OPTION VALUE="#">Welcome<br />
<br />
<OPTION VALUE="#">To<br />
<br />
<OPTION VALUE="#">A1<br />
<br />
<OPTION VALUE="#">JavaScripts<br />
<br />
<OPTION VALUE="#"><br />
<br />
</SELECT><br />
<br />
<!--// Clicking this button will take you to the url that corresponds to the choice you made from the drop down //--><br />
<br />
<INPUT TYPE=button onclick="window.parent.contents.location=document.f.s.options[document.f.s.selectedIndex].value" VALUE=">>"><br />
<br />
</FORM><!--content-->Thanks Mark!<br />
<br />
Here is my current frame layout and need some help getting it to work. Sorry about the PM, I was having a "Blonde" moment...<br />
<br />
<br />
</HEAD> <br />
<frameset rows=12%,88% bordercolor=red> <br />
<frame src=http://www.htmlforums.com/archive/index.php/header.html name=Top scrolling=no <br />
marginwidth=0 marginheight=0 noresize=yes> <br />
<frame src=http://www.htmlforums.com/archive/index.php/main.html name=Main scrolling=auto <br />
marginwidth=0 marginheight=0 noresize=yes> <br />
</frameset> <br />
<noframes> <br />
You need a frames capable browser to view this page. <br />
</noframes> <br />
</HTML> <br />
<br />
The Menu Script will be placed in the header.html file<br />
<br />
Also, is there a way to make sure it always calls the "_top". I do not want a frame to be loaded within another frame. I hope this makes sense, as I am quite a novice...But, with this forum - I am learning tons of new stuff!<!--content-->Just change this part in the code from top (placed in header.html file):<br />
<br />
<br />
<INPUT TYPE=button onclick="window.parent.Main.location=document.f.s.options[document.f.s.selectedIndex].value" VALUE=">>"><br />
<br />
<br />
P.S. To be safe, you should put all your HTML code in small cases. <br />
<br />
I don't understand this :confused: :<br />
<br />
Also, is there a way to make sure it always calls the "_top". I do not want a frame to be loaded within another frame.<!--content-->
 
Back
Top