Does anyone have any suggests for making this open in a new window?
var maxLength = 10;
siteopt = new Array;
siteopt[0] = "Genesis";
siteopt[1] = "Exodus";
var trueLength = siteopt.length;
var lst = siteopt.length;
url = new Array;
url[0] = "../genesis.html";
url[1] = "../exodus.html";
catopt = new Array;
catopt[0] = "Old Testament Books";
catopt[1] = "New Testament Books";
function changePage()
{
menuNum = document.SelectMenu.SelectPrimary.selectedIndex;
if (menuNum == null){alert("Please select a category from the menu.");return;}
else
{
i = document.SelectMenu.SelectSecondary.selectedIndex;
window.location.href = url;
}
}
function changeMenu()
{
siteopt.length = 0;
menuNum = document.SelectMenu.SelectPrimary.selectedIndex;
if (menuNum == null) return;
if (menuNum == 0)
{
siteopt = new Array;
siteopt[0] = new Option("Genesis");
siteopt[1] = new Option("Exodus");
url = new Array;
url[0] = "../genesis.html";
url[1] = "../exodus.html";
}
if (menuNum == 1)
{
siteopt = new Array;
siteopt[0] = new Option("Matthew");
siteopt[1] = new Option("Mark");
url = new Array;
url[0] = "../matthew.html";
url[1] = "../mark.html";
}
tot = siteopt.length;
for (i = lst; i > 0; i--)
{ document.SelectMenu.SelectSecondary.options = null; }
for (i = 0; i < tot; i++)
{ document.SelectMenu.SelectSecondary.options = siteopt; }
document.SelectMenu.SelectSecondary.options[0].selected = true;
lst = siteopt.length;
}
with (document) {
writeln('<TABLE BORDER = 0 BGCOLOR = "#000000" CELLPADDING = 3 CELLSPACING = 0>');
writeln('<TR><TD COLSPAN = 3><FORM NAME = "SelectMenu">');
writeln('<FONT SIZE = 4 FACE = "Times" COLOR = "#FFFFFF">');
writeln('Bible Book Finder</FONT>');
writeln('</TD></TR><TR><TD ALIGN = LEFT>');
writeln('<FONT SIZE = 2 FACE = "Times" COLOR = "#FFFFFF">Testament</FONT><BR>');
writeln('<SELECT NAME="SelectPrimary" onChange="changeMenu(this.form)">');
tot = catopt.length;
for (i = 0; i < tot; i++)
writeln("<OPTION>" +catopt);
writeln("</SELECT>");
writeln('</TD><TD>');
writeln('<FONT SIZE = 2 FACE = "Times" COLOR = "#FFFFFF">Book</FONT><BR>');
writeln('<SELECT NAME="SelectSecondary">');
for (i = 0; i < maxLength; i++)
writeln("<OPTION>" +siteopt);
writeln("</SELECT>");
for (i = maxLength; i > trueLength; i--)
{ SelectMenu.SelectSecondary.options = null; }
writeln('</TD><TD VALIGN = BOTTOM><A HREF = <!-- m --><a class="postlink" href="http://www.webdeveloper.com/forum/archive/index.php/">http://www.webdeveloper.com/forum/archive/index.php/</a><!-- m -->"javascript:changePage();">');
writeln('<IMG BORDER = 0 HEIGHT = 27 WIDTH = 70 SRC = <!-- m --><a class="postlink" href="http://www.webdeveloper.com/forum/archive/index.php/">http://www.webdeveloper.com/forum/archive/index.php/</a><!-- m -->"../jump1.gif"></A>');
writeln('</TD></TR>');
changeMenu();
writeln('</FORM>');
writeln('</TABLE>');
}
Mick
var maxLength = 10;
siteopt = new Array;
siteopt[0] = "Genesis";
siteopt[1] = "Exodus";
var trueLength = siteopt.length;
var lst = siteopt.length;
url = new Array;
url[0] = "../genesis.html";
url[1] = "../exodus.html";
catopt = new Array;
catopt[0] = "Old Testament Books";
catopt[1] = "New Testament Books";
function changePage()
{
menuNum = document.SelectMenu.SelectPrimary.selectedIndex;
if (menuNum == null){alert("Please select a category from the menu.");return;}
else
{
i = document.SelectMenu.SelectSecondary.selectedIndex;
window.location.href = url;
}
}
function changeMenu()
{
siteopt.length = 0;
menuNum = document.SelectMenu.SelectPrimary.selectedIndex;
if (menuNum == null) return;
if (menuNum == 0)
{
siteopt = new Array;
siteopt[0] = new Option("Genesis");
siteopt[1] = new Option("Exodus");
url = new Array;
url[0] = "../genesis.html";
url[1] = "../exodus.html";
}
if (menuNum == 1)
{
siteopt = new Array;
siteopt[0] = new Option("Matthew");
siteopt[1] = new Option("Mark");
url = new Array;
url[0] = "../matthew.html";
url[1] = "../mark.html";
}
tot = siteopt.length;
for (i = lst; i > 0; i--)
{ document.SelectMenu.SelectSecondary.options = null; }
for (i = 0; i < tot; i++)
{ document.SelectMenu.SelectSecondary.options = siteopt; }
document.SelectMenu.SelectSecondary.options[0].selected = true;
lst = siteopt.length;
}
with (document) {
writeln('<TABLE BORDER = 0 BGCOLOR = "#000000" CELLPADDING = 3 CELLSPACING = 0>');
writeln('<TR><TD COLSPAN = 3><FORM NAME = "SelectMenu">');
writeln('<FONT SIZE = 4 FACE = "Times" COLOR = "#FFFFFF">');
writeln('Bible Book Finder</FONT>');
writeln('</TD></TR><TR><TD ALIGN = LEFT>');
writeln('<FONT SIZE = 2 FACE = "Times" COLOR = "#FFFFFF">Testament</FONT><BR>');
writeln('<SELECT NAME="SelectPrimary" onChange="changeMenu(this.form)">');
tot = catopt.length;
for (i = 0; i < tot; i++)
writeln("<OPTION>" +catopt);
writeln("</SELECT>");
writeln('</TD><TD>');
writeln('<FONT SIZE = 2 FACE = "Times" COLOR = "#FFFFFF">Book</FONT><BR>');
writeln('<SELECT NAME="SelectSecondary">');
for (i = 0; i < maxLength; i++)
writeln("<OPTION>" +siteopt);
writeln("</SELECT>");
for (i = maxLength; i > trueLength; i--)
{ SelectMenu.SelectSecondary.options = null; }
writeln('</TD><TD VALIGN = BOTTOM><A HREF = <!-- m --><a class="postlink" href="http://www.webdeveloper.com/forum/archive/index.php/">http://www.webdeveloper.com/forum/archive/index.php/</a><!-- m -->"javascript:changePage();">');
writeln('<IMG BORDER = 0 HEIGHT = 27 WIDTH = 70 SRC = <!-- m --><a class="postlink" href="http://www.webdeveloper.com/forum/archive/index.php/">http://www.webdeveloper.com/forum/archive/index.php/</a><!-- m -->"../jump1.gif"></A>');
writeln('</TD></TR>');
changeMenu();
writeln('</FORM>');
writeln('</TABLE>');
}
Mick