[cc-commits] [CC SVN] r12895 - ccsearch/branches/no-iframe

webmaster at creativecommons.org webmaster at creativecommons.org
Wed Jul 8 20:22:45 EDT 2009


Author: pyrak
Date: 2009-07-09 00:22:45 +0000 (Thu, 09 Jul 2009)
New Revision: 12895

Modified:
   ccsearch/branches/no-iframe/search.js
Log:
fixed a couple js bugs that i just created

Modified: ccsearch/branches/no-iframe/search.js
===================================================================
--- ccsearch/branches/no-iframe/search.js	2009-07-09 00:18:42 UTC (rev 12894)
+++ ccsearch/branches/no-iframe/search.js	2009-07-09 00:22:45 UTC (rev 12895)
@@ -6,9 +6,24 @@
 
 var lang = "";
 
+/*couple helper functions*/
+
 // don't need an entire framework just for this
 function id(i) { return document.getElementById(i); }
 
+// function by Pete Freitag (pete at cfdev.com)
+function getQueryStrVariable(variable) {
+  var query = window.location.search.substring(1);
+  var vars = query.split("&");
+  for (var i=0;i<vars.length;i++) {
+    var pair = vars[i].split("=");
+    if (pair[0] == variable) {
+      return pair[1];
+    }
+  }
+	return null;
+}
+
 /* these 3 functions just handle the clever auto-clear stuff*/
 // note: var d, the default input text, is defined in the head of index.php
 // this way, we can use php to translate it (clever, eh?)
@@ -82,19 +97,3 @@
     return null;
 }
 
-
-/* we don't use this anymore, because all query processing is done in php
-** this is probably for the better
-// function by Pete Freitag (pete at cfdev.com)
-function getQueryStrVariable(variable) {
-  var query = window.location.search.substring(1);
-  var vars = query.split("&");
-  for (var i=0;i<vars.length;i++) {
-    var pair = vars[i].split("=");
-    if (pair[0] == variable) {
-      return pair[1];
-    }
-  }
-	return null;
-}
-*/




More information about the cc-commits mailing list