added "server_name" property to CGI objects (for building unAPI tags)
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 5 Mar 2006 16:07:05 +0000 (16:07 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 5 Mar 2006 16:07:05 +0000 (16:07 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@3261 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/opac/common/js/CGI.js

index 456ed2e..28e9e6d 100644 (file)
@@ -5,6 +5,7 @@ function CGI() {
        this.data = new Object();
 
        var string = location.search.replace(/^\?/,"");
+       this.server_name = location.href.replace(/^https?:\/\/([^\/]+).+$/,"$1");
 
        var key = ""; 
        var value = "";