ScottInTexas
11-24-2002, 05:48 PM
The scrip works and if I allow scrolling in the iframe you can scroll to the menu items. I want to add OnClick to the TD tags (if allowed) but first I want to at least see it the way I want.
Here is the pertinent code.
<SCRIPT type="text/javascript">
function SetMenu(){
var aryItems=new Array("Garbage"," ", "Calendar of Events", "Cal","Whats New", "New", "For Sale","Sale","Contact Us","email","FAQ","FAQ");
var bigtxt;
var begmark;
var endmark;
var MenuText;
begmark='<TABLE><TR>';
endmark='</TR></TABLE>';
bigtxt=begmark;
for (i=0;i<aryItems.length;i++){
MenuText=aryItems[i];
bigtxt=bigtxt+'<TD style="MenuItem">' + MenuText + '</TD>';
i++;
}
bigtxt=bigtxt+endmark;
parent.menubar.document.write(bigtxt);
}
</script>
</head>
<body onload="SetMenu()">
<Div Class="Header">Sweeny Horse 4-H Club<br>'Making the best better!'</DIV>
<iframe name="menubar" width="100%" class="menu" valign="top" scrolling="no" height="20"></iframe>
blah
blah
blah
</body>
</HTML>
I may be approaching the whole thing wrong, so your comments on that are welcome. The idea is that I have a simple menu at the top of the screen. I know there are probably 2000 downloadable menus but I want to do my own.
Thanks for the help!
Scott
Here is the pertinent code.
<SCRIPT type="text/javascript">
function SetMenu(){
var aryItems=new Array("Garbage"," ", "Calendar of Events", "Cal","Whats New", "New", "For Sale","Sale","Contact Us","email","FAQ","FAQ");
var bigtxt;
var begmark;
var endmark;
var MenuText;
begmark='<TABLE><TR>';
endmark='</TR></TABLE>';
bigtxt=begmark;
for (i=0;i<aryItems.length;i++){
MenuText=aryItems[i];
bigtxt=bigtxt+'<TD style="MenuItem">' + MenuText + '</TD>';
i++;
}
bigtxt=bigtxt+endmark;
parent.menubar.document.write(bigtxt);
}
</script>
</head>
<body onload="SetMenu()">
<Div Class="Header">Sweeny Horse 4-H Club<br>'Making the best better!'</DIV>
<iframe name="menubar" width="100%" class="menu" valign="top" scrolling="no" height="20"></iframe>
blah
blah
blah
</body>
</HTML>
I may be approaching the whole thing wrong, so your comments on that are welcome. The idea is that I have a simple menu at the top of the screen. I know there are probably 2000 downloadable menus but I want to do my own.
Thanks for the help!
Scott