> If anyone knows of a script that will do what I want it to do (opening
> all docs in the main frame, natch!), or if you have any idea what I'm
> doing wrong, please help!!!!!
Well... there was a fair number of things amiss with the code, actually. A missing bracket after the jump() function for starters, which stopped the rest of the script dead before it could execute... also, two different objects with the same name (the select boxes), an absence of targets from the URLs to the "main" frame, and some other problems.
Anyway... I did a very quick rewrite of the code, and have it working OK in NS 3, 4 and 4.5, MSIE 4 and Opera 3.5. One particular change is that instead of having that long list of entries...
}else if (loc == "Mgmt./Women"){
location="profess/women.htm";
...etc, I've simply included the URLs as values for the select-box options. This simplifies the code quite a bit. You'll also note that I now have two functions rather than one, and likewise two forms. I could have combined them, but I left them separated out so you can see more easily what does what.
Here's the abbreviated version:
-----
<script language="JavaScript">
function jumpOneFunct(){
var jumpOne = document.jumpOneSelect.jumpMenu
parent.frames[2].location = jumpOne.options[jumpOne.selectedIndex].value;
}
function jumpTwoFunct(){
var jumpTwo = document.jumpTwoSelect.jumpMenuTwo
parent.frames[2].location = jumpTwo.options[jumpTwo.selectedIndex].value;
}
</script>
[snip]
<form name="jumpOneSelect">
<select name="jumpMenu">
<option value="main.htm">Choose an area:
<option value="main.htm">----------
<option value="liberal/arts.htm#Art">Art
<option value="liberal/lib_econ.htm">Economics
[snip]
</select>
<input type="BUTTON" value="GO!" onclick="jumpOneFunct()">
</form>
<form name="jumpTwoSelect">
<select name="jumpMenuTwo">
<option value="main.htm">Choose an area:
<option value="main.htm">----------
<option value="profess/allied.htm">Allied Health
[snip]
</select>
<input type="BUTTON" value="GO!" onclick="jumpTwoFunct()">
</form>
----
Hope this helps.
-----------
Brent Eades, Almonte, Ontario
E-mail: [EMAIL PROTECTED]
[EMAIL PROTECTED]
Web: http://www.almonte.com/
____________________________________________________________________
--------------------------------------------------------------------
Join The NEW Web Consultants Association FORUMS and CHAT:
Register Today at: http://just4u.com/forums/
Web Consultants Web Site : http://just4u.com/webconsultants
Give the Gift of Life This Year...
Just4U Stop Smoking Support forum - helping smokers for
over three years-tell a friend: http://just4u.com/forums/
To get 500 Banner Ads for FREE
go to http://www.linkbuddies.com/start.go?id=111261
---------------------------------------------------------------------
