You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

Sample external search boxes

Code for external search box

In <HEAD> section of the page:

<script language="JavaScript" src="http://wfsearch.webfeat.org/clients/cornellu/js/cornellu.js"  ></script>
<script language="JavaScript" src="http://wfsearch.webfeat.org/js/wf3library.js"  ></script>
<script language="JavaScript" src="http://wfsearch.webfeat.org/clients/cornellu/js/cornelluCustom.js"  ></script>

Anywhere in the <BODY> you want the form to appear:

<script>
function changeCatName() {

    var i = document.wfform.Databases.selectedIndex;
    var DBCat = document.wfform.Databases[i].id;
    var DBCatNew = DBCat.replace(/&/g,'%26');

 document.wfform.catName.value = DBCatNew;
}
</script>

<form action="http://wfsearch.webfeat.org/clients/cornellu/cornell_auth.asp" method="get" name="wfform">
<input type="hidden" name="Command" value="Search">
<input type="hidden" name="Client_ID" value="cornellu">
<input type="hidden" name="noserial" value="1">
<input type="hidden" value="JS" name="format">
<input type="hidden" value="js" name="rtmpl">
<input type="text" name="wf_term1" id="wf_term1" value="">
<input type="hidden" name="wf_field1" value="wf_keyword">
<!-- You can change the value here to create a link that will take you back to a particular page-->
<input type="hidden" name="catName" value="General">
<!-- Adding outside field to keep this query separate from ones from main page -->
<input type="hidden" name="outside" value="YES">

      in
<!-- Here is where you add the databases and categories you would like searched-->
<!-- Here is a sample with a dropdown list of categories to search. See below for a simple search box option -->
 
<select name="Databases" id="Databases" onChange="changeCatName()">
     <option value="wf_ebscoxml_aph,wf_artindexretro" id="General">General</option>
     <option value="wf_ebscoxml_aph,wf_anthroplus" id="Social Sciences and Area Studies">Social Sciences and Area Studies</option>
     <option value="wf_artindexretro" id="Arts %26 Humanities">Arts & Humanities</option>
 </select>   
<input type="submit" name="Submit" value="Search" class="button" />  
</form>  
--------------------------------- 
END of code

For a simple search box option  
In the above code replace:<select name="Databases" id="Databases" onChange="changeCatName()">
     <option value="wf_ebscoxml_aph,wf_artindexretro" id="General">General</option>
     <option value="wf_ebscoxml_aph,wf_anthroplus" id="Social Sciences and Area Studies">Social Sciences and Area Studies</option>
     <option value="wf_artindexretro" id="Arts %26 Humanities">Arts & Humanities</option>
 </select> 
With: <input type="hidden" name="Databases" id="Databases" value="wf_ebscoxml_aph,wf_artindexretro,wf_artindexretro" />

Attachments

No files shared here yet.
  • No labels