I'm in the early stages of designing a website and am having some trouble with a script for a dropdown menu that I've found on the net (on this site probably).
I'm using the dropdown menu in a contents-frame and I've set it so that it should open links in the right (main) frame.
It actually worked initially, but now it says a script error occured every time I try to access a link. This is my first website so I would think that any experienced person would be able to point out the problem for me.
ps. could someone explain to me how to make the "criteria dropdown box script" work in frames? (you know, the one which deals with cars and year built in the example)
whew! hope somebody takes the time to read this!
here's the html of the contents page:
<html>
<head>
<script>
<!--
function land(ref, target)
{
lowtarget=target.toLowerCase();
if (lowtarget=="_self") {window.location=loc;}
else {if (lowtarget=="_top") {top.location=loc;}
else {if (lowtarget=="_blank") {window.open(loc);}
else {if (lowtarget=="_parent") {parent.location=loc;}
else {parent.frames[target].location=loc;};
}}}
}
function jump(menu)
{
ref=menu.choice.options[menu.choice.selectedIndex].value;
splitc=ref.lastIndexOf("*");
target="";
if (splitc!=-1)
{loc=ref.substring(0,splitc);
target=ref.substring(splitc+1,1000);}
else {loc=ref; target="_self";};
if (ref != "") {land(loc,target);}
}
//-->
</script>
<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>New Page 3</title>
<base target="main">
</head>
<body bgcolor="#000099" text="#FFFFFF" background="images/background4.gif">
<form>
</form>
<p>
<select name="choice" size="1" onChange="jump(this.form)">
<option value=http://www.webdeveloper.com/forum/archive/index.php/"">Brands</option>
<option value="file:///C:/Work/urside/real/alpina.htm*main">Alpina</option>
<option value="file:///C:/Work/urside/real/angelus.htm*main">Angelus</option>
<option value="file:///C:/Work/urside/real/breitling.htm*main">Breitling</option>
<option value="file:///C:/Work/urside/real/bulova.htm*main">Bulova</option>
<option value="file:///C:/Work/urside/real/Buren.htm*main">B黵en</option>
<option value="file:///C:/Work/urside/real/bwc.htm*main">BWC</option>
<option value="file:///C:/Work/urside/real/cartier.htm*main">Cartier</option>
<option value="file:///C:/Work/urside/real/certina.htm*main">Certina</option>
<option value="file:///C:/Work/urside/real/suisse.htm*main">Chronograph Suisse</option>
<option value="file:///C:/Work/urside/real/citizen.htm*main">Citizen</option>
<option value="file:///C:/Work/urside/real/cortebert.htm*main">Cort閎ert</option>
<option value="file:///C:/Work/urside/real/cyma.htm*main">Cyma</option>
<option value="file:///C:/Work/urside/real/doxa.htm*main">Doxa</option>
<option value="file:///C:/Work/urside/real/dunhill.htm*main">Dunhill</option>
<option value="file:///C:/Work/urside/real/elgin.htm*main">Elgin</option>
<option value="file:///C:/Work/urside/real/enicar.htm*main">Enicar</option>
<option value="file:///C:/Work/urside/real/eterna.htm*main">Eterna</option>
<option value="file:///C:/Work/urside/real/favreleuba.htm*main">Farve-Leuba</option>
<option value="file:///C:/Work/urside/real/fortis.htm*main">Fortis</option>
<option value="file:///C:/Work/urside/real/girard.htm*main">Girard-Perregaux</option>
<option value="file:///C:/Work/urside/real/glashutte.htm*main">Glashé»·te</option>
<option value="file:///C:/Work/urside/real/glycine.htm*main">Glycine</option>
<option value="file:///C:/Work/urside/real/gruen.htm*main">Gruen</option>
<option value="file:///C:/Work/urside/real/hamilton.htm*main">Hamilton</option>
<option value="file:///C:/Work/urside/real/iwc.htm*main">IWC</option>
<option value="file:///C:/Work/urside/real/lecoultre.htm*main">Jaeger Le Coultre</option>
<option value="file:///C:/Work/urside/real/lemania.htm*main">L閙ania</option>
<option value="file:///C:/Work/urside/real/longines.htm*main">Longines</option>
<option value="file:///C:/Work/urside/real/minerva.htm*main">Minerva</option>
<option value="file:///C:/Work/urside/real/movado.htm*main">Movado</option>
<option value="file:///C:/Work/urside/real/omega.htm*main">Omega</option>
<option value="file:///C:/Work/urside/real/pierce.htm*main">Pierce</option>
<option value="file:///C:/Work/urside/real/rado.htm*main">Rado</option>
<option value="file:///C:/Work/urside/real/record.htm*main">Record</option>
<option value="file:///C:/Work/urside/real/rolex.htm*main">Rolex</option>
<option value="file:///C:/Work/urside/real/tagheuer.htm*main">Tag-Heuer</option>
<option value="file:///C:/Work/urside/real/tavannes.htm*main">Tavannes</option>
<option value="file:///C:/Work/urside/real/tissot.htm*main">Tissot</option>
<option value="file:///C:/Work/urside/real/titus.htm*main">Titus</option>
<option value="file:///C:/Work/urside/real/universal.htm*main">Universal</option>
<option value="file:///C:/Work/urside/real/wittnauer.htm*main">Wittnauer</option>
<option value="file:///C:/Work/urside/real/zenith.htm*main">Zenith</option>
<option value="file:///C:/Work/urside/real/zodiac.htm*main">Zodiac</option>
<option value="">- - - - - - - - - -</option>
</select>
</p>
</body>
</html>
I'm using the dropdown menu in a contents-frame and I've set it so that it should open links in the right (main) frame.
It actually worked initially, but now it says a script error occured every time I try to access a link. This is my first website so I would think that any experienced person would be able to point out the problem for me.
ps. could someone explain to me how to make the "criteria dropdown box script" work in frames? (you know, the one which deals with cars and year built in the example)
whew! hope somebody takes the time to read this!
here's the html of the contents page:
<html>
<head>
<script>
<!--
function land(ref, target)
{
lowtarget=target.toLowerCase();
if (lowtarget=="_self") {window.location=loc;}
else {if (lowtarget=="_top") {top.location=loc;}
else {if (lowtarget=="_blank") {window.open(loc);}
else {if (lowtarget=="_parent") {parent.location=loc;}
else {parent.frames[target].location=loc;};
}}}
}
function jump(menu)
{
ref=menu.choice.options[menu.choice.selectedIndex].value;
splitc=ref.lastIndexOf("*");
target="";
if (splitc!=-1)
{loc=ref.substring(0,splitc);
target=ref.substring(splitc+1,1000);}
else {loc=ref; target="_self";};
if (ref != "") {land(loc,target);}
}
//-->
</script>
<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>New Page 3</title>
<base target="main">
</head>
<body bgcolor="#000099" text="#FFFFFF" background="images/background4.gif">
<form>
</form>
<p>
<select name="choice" size="1" onChange="jump(this.form)">
<option value=http://www.webdeveloper.com/forum/archive/index.php/"">Brands</option>
<option value="file:///C:/Work/urside/real/alpina.htm*main">Alpina</option>
<option value="file:///C:/Work/urside/real/angelus.htm*main">Angelus</option>
<option value="file:///C:/Work/urside/real/breitling.htm*main">Breitling</option>
<option value="file:///C:/Work/urside/real/bulova.htm*main">Bulova</option>
<option value="file:///C:/Work/urside/real/Buren.htm*main">B黵en</option>
<option value="file:///C:/Work/urside/real/bwc.htm*main">BWC</option>
<option value="file:///C:/Work/urside/real/cartier.htm*main">Cartier</option>
<option value="file:///C:/Work/urside/real/certina.htm*main">Certina</option>
<option value="file:///C:/Work/urside/real/suisse.htm*main">Chronograph Suisse</option>
<option value="file:///C:/Work/urside/real/citizen.htm*main">Citizen</option>
<option value="file:///C:/Work/urside/real/cortebert.htm*main">Cort閎ert</option>
<option value="file:///C:/Work/urside/real/cyma.htm*main">Cyma</option>
<option value="file:///C:/Work/urside/real/doxa.htm*main">Doxa</option>
<option value="file:///C:/Work/urside/real/dunhill.htm*main">Dunhill</option>
<option value="file:///C:/Work/urside/real/elgin.htm*main">Elgin</option>
<option value="file:///C:/Work/urside/real/enicar.htm*main">Enicar</option>
<option value="file:///C:/Work/urside/real/eterna.htm*main">Eterna</option>
<option value="file:///C:/Work/urside/real/favreleuba.htm*main">Farve-Leuba</option>
<option value="file:///C:/Work/urside/real/fortis.htm*main">Fortis</option>
<option value="file:///C:/Work/urside/real/girard.htm*main">Girard-Perregaux</option>
<option value="file:///C:/Work/urside/real/glashutte.htm*main">Glashé»·te</option>
<option value="file:///C:/Work/urside/real/glycine.htm*main">Glycine</option>
<option value="file:///C:/Work/urside/real/gruen.htm*main">Gruen</option>
<option value="file:///C:/Work/urside/real/hamilton.htm*main">Hamilton</option>
<option value="file:///C:/Work/urside/real/iwc.htm*main">IWC</option>
<option value="file:///C:/Work/urside/real/lecoultre.htm*main">Jaeger Le Coultre</option>
<option value="file:///C:/Work/urside/real/lemania.htm*main">L閙ania</option>
<option value="file:///C:/Work/urside/real/longines.htm*main">Longines</option>
<option value="file:///C:/Work/urside/real/minerva.htm*main">Minerva</option>
<option value="file:///C:/Work/urside/real/movado.htm*main">Movado</option>
<option value="file:///C:/Work/urside/real/omega.htm*main">Omega</option>
<option value="file:///C:/Work/urside/real/pierce.htm*main">Pierce</option>
<option value="file:///C:/Work/urside/real/rado.htm*main">Rado</option>
<option value="file:///C:/Work/urside/real/record.htm*main">Record</option>
<option value="file:///C:/Work/urside/real/rolex.htm*main">Rolex</option>
<option value="file:///C:/Work/urside/real/tagheuer.htm*main">Tag-Heuer</option>
<option value="file:///C:/Work/urside/real/tavannes.htm*main">Tavannes</option>
<option value="file:///C:/Work/urside/real/tissot.htm*main">Tissot</option>
<option value="file:///C:/Work/urside/real/titus.htm*main">Titus</option>
<option value="file:///C:/Work/urside/real/universal.htm*main">Universal</option>
<option value="file:///C:/Work/urside/real/wittnauer.htm*main">Wittnauer</option>
<option value="file:///C:/Work/urside/real/zenith.htm*main">Zenith</option>
<option value="file:///C:/Work/urside/real/zodiac.htm*main">Zodiac</option>
<option value="">- - - - - - - - - -</option>
</select>
</p>
</body>
</html>