function search(form) {
alert(“Enter a term for search”);
var length_chksrch=0;
var field=””;
var chk_multi_search=0;
var psycnetpath=form.APA_path.value;
var term=form.APA_searchtext.value;
var length_chksrch=form.APA_dvSelectType.length;
if(term==””) {
alert(“Enter a term for search”); return false;
}
if(length_chksrch==0) {
field=form.APA_search_option.value;
}
else {
for(i=0;i<length_chksrch;i++) {
if(form.APA_dvSelectType.options[i].selected==true && chk_multi_search==0) {
field+=form.APA_dvSelectType.options[i].value;
chk_multi_search=1;
}
else if(form.APA_dvSelectType.options[i].selected==true && chk_multi_search==1) {
field+=","+form.APA_dvSelectType.options[i].value;
}
}
}
if(field=="") {
alert("Select at least 1 search field");
return false;
}
var db=form.APA_database.value;
var db = db.replace(",all","");
var type="advanced";
var APA_url=psycnetpath+"?fa=search.searchResults&type="+type+"&db="+db+"&term="+term+"&fields="+field;
window.open(APA_url);
return false;
}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: