Hi everyone,
Is there a javascript code that will allow for a hyperlink option in a drop-down form? I have the following code. It works great--it gives the option to search different databases. However, I would like the last option in the search form drop-down to be a hyperlink where people can click on it and be taken to another page with a full database list. Is there any way to do this? I would appreciate any help. Thanks.
<script language="JavaScript">
<!--
//
// Script by Jari Aarniala
//
// This script makes it easy to choose with which search engine
// you`d like to search the net. You may use this if you keep this
// text here...
//
function startSearch(){
searchString = document.searchForm.searchText.value;
if(searchString != ""){
searchEngine = document.searchForm.whichEngine.selectedIndex + 1;
finalSearchString = "";
if(searchEngine == 1){
finalSearchString = "http://ezproxy.twu.edu:2048/login?url=http://search.ebscohost.com/login.aspx?direct=true&db=aph&bquery=" + searchString;
}
if(searchEngine == 2){
finalSearchString = "http://ezproxy.twu.edu:2048/login?url=http://search.ebscohost.com/login.aspx?direct=true&db=rzh&bquery=" + searchString;
}
if(searchEngine == 3){
finalSearchString = "http://ezproxy.twu.edu:2048/login?url=http://search.ebscohost.com/login.aspx?direct=true&db=mnh&bquery=" + searchString;
}
if(searchEngine == 4){
finalSearchString = "http://ezproxy.twu.edu:2048/login?url=http://search.ebscohost.com/login.aspx?direct=true&db=psyh&bquery=" + searchString;
}
location.href = finalSearchString;
}
}
// -->
</script>
<basefont face="Verdana, Arial, sans-serif">
<form name="searchForm">
<input type="text" size="27" name="searchText" value=' type in a keyword or "phrase"' class="cleardefault" />
<select style="background: dddddd" name="whichEngine" >
<option selected>Academic Search Premier</option>
<option>CINAHL Plus with Full Text</option>
<option>Medline with Full Text</option>
<option>PsycINFO</option>
<option value"">Please click here to be taken to database list</option>
</select><input type="button" value="Search" onClick="startSearch()">
</select>



Reply With Quote

Bookmarks