Something like this should work :
Code:
<script type="text/javascript" language="JavaScript">
function nav()
{
var w = document.qsearch.xfer.selectedIndex;
var url_add = document.qsearch.xfer.options[w].value;
window.location.href = url_add;
}
</script>
<form id="qsearch" name="qsearch">
<fieldset id="qsearch">
<select name="xfer" size="1" onChange="nav()">
<option selected value="Select speaker...">Select speaker...</option>
<option value="[~99~]?tags=A.Brown">A.Brown</option>
<option value="[~99~]?tags=B.Smith">B.Smith</option>
<option value="[~99~]?tags=C.Jones">C.Jones</option>
</select>
</fieldset>
</form>
Where 99 is the id of the document with the Ditto call.
i need to create several option lists ... does anyone know if it’s possible to use the above code for this? i tried several options but it doesn’t work. e.g.
<script type="text/javascript" language="JavaScript">
function nav()
{
var w = document.qsearch.xfer.selectedIndex;
var url_add = document.qsearch.xfer.options[w].value;
window.location.href = url_add;
}
{
var w = document.qsearch2.xfer2.selectedIndex;
var url_add = document.qsearch2.xfer2.options[w].value;
window.location.href = url_add;
}
</script>
<form name="qsearch">
<select id="qsearch" name="xfer" size="1" onChange="nav()">
<option selected value="jump to">jump to</option>
[!Ditto? &parents=`2` &tpl=`DittoQuicklinks`!]
</select>
</form>
<form name="qsearch2">
<select id="qsearch2" name="xfer2" size="1" onChange="nav()">
<option selected value="jump to">jump to</option>
[!Ditto? &parents=`10` &tpl=`DittoQuicklinks`!]
</select>
</form>
thanks, j
*edit: there are other js ways to do the same, but this would work best with another script i use