Skip to content

Commit

Permalink
Completed a working solution for dynamically changing the article sea…
Browse files Browse the repository at this point in the history
…rch form action.
  • Loading branch information
Gautam authored and Gautam committed Apr 3, 2012
1 parent 38fadc3 commit 62ce19c
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions aristotle/templates/article_search/app.html
Expand Up @@ -97,16 +97,21 @@ <h2>Article Search App</h2>
{
if (document.getElementById("dbs").innerHTML=='Search Academic Search Complete')
{
url = "http://0-search.ebscohost.com.tiger.coloradocollege.edu:80/login.aspx?direct=true&db=a9h&bquery=" + document.getElementById("searchIcon").value + "&type=1&site=ehost-live";
var url = "";
url = url.concat("http://0-search.ebscohost.com.tiger.coloradocollege.edu:80/login.aspx%3Fdirect=true&db=a9h&bquery=", escape(document.getElementById("searchIcon").value).replace(/%20/g, '+'), "&type=1&site=ehost-live");
document.searchForm.action = url;
}
else if (document.getElementById("dbs").innerHTML=="Search JSTOR")
{
document.searchForm.action ="update.html";
var url = "";
url = url.concat("http://0-www.jstor.org.tiger.coloradocollege.edu/action/doBasicSearch%3FQuery=", escape(document.getElementById("searchIcon").value).replace(/%20/g, '+'), "&wc=on&acc=on");
document.searchForm.action = url;
}
else if (document.getElementById("dbs").innerHTML=="Search Google Scholar")
{
document.searchForm.action ="update.html";
var url = "";
url = url.concat("http://0-scholar.google.com.tiger.coloradocollege.edu/scholar%3Fq=", escape(document.getElementById("searchIcon").value).replace(/%20/g, '+'));
document.searchForm.action = url;
}
return true;
}
Expand Down

0 comments on commit 62ce19c

Please sign in to comment.