ooops. duplicate var i
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 2 Aug 2006 21:05:29 +0000 (21:05 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 2 Aug 2006 21:05:29 +0000 (21:05 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@5233 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/opac/skin/default/js/adv_global.js

index 8f3dd50..767a3f1 100644 (file)
@@ -138,10 +138,13 @@ function advBuildSearchBlob() {
                if(!term) continue;
 
                var string = "";
+
                if(!searches) searches = {};
+
                if(searches[stype]) 
                        string = searches[stype].term;
-               else searches[stype] = {};
+               else 
+                       searches[stype] = { term : "" };
 
                switch(contains) {
                        case 'contains' : 
@@ -150,8 +153,8 @@ function advBuildSearchBlob() {
 
                        case 'nocontains' : {
                                var words = term.split(" ");
-                                       for( var i in words ) 
-                                               string += " -" + words[i];
+                                       for( var j in words ) 
+                                               string += " -" + words[j];
                                }
                                break;