Forum Moderators: open
<SCRIPT LANGUAGE="javascript">
function LinkUp()
{
var number = document.DropDown.DDlinks.selectedIndex;
parent.artistgroup.location= document.DropDown.DDlinks.options[number].value;
}
</SCRIPT>
<SCRIPT LANGUAGE="javascript">
function LinkUp()
{
var number = window.DropDown.DDlinks.selectedIndex;
artistgroup.location= window.DropDown.DDlinks.options[number].value;
}
</SCRIPT>
If you're doing what I think you're doing, try this. Note it passes the object itself, and operates off of the variable selected index of the field. UNTESTED but this should work, it's pretty academic. Also presuming "artistgroup" is a named frame? You should assign an ID to that too.
<script type="text/javascript">
function LinkUp(selectObject){
var num = selectObject.selectedIndex;
if (num > 0) {
artistgroup.location=selectObject.options[num].value;
}
}
</script>
<select name="whocares" id="doesntmatter" onChange="LinkUp(this);">
<option value="">SELECT</option>
<option value="thispage.html">This Page</option>
<option value="thatpage.html">That Page</option>
</select>
<script type="text/javascript">
function LinkUp(selectObject){
artistgroup.location.hash=selectObject.options[selectObject.selectedIndex].value;
}
</script>
<select onChange="LinkUp(this);">
<option value="top">Choose an Anchor</option>
<option value="anchor1">first anchor</option>
<option value="anchor2">second anchor</option>
</select>
<a name="anchor1" id="anchor1"></a>
.....
<a name="anchor2" id="anchor2"></a>