Team:UCL London/Search

From 2010.igem.org

(Difference between revisions)
 
Line 6: Line 6:
     <script type="text/javascript">
     <script type="text/javascript">
       google.load('search', '1');
       google.load('search', '1');
-
 
-
      /**
 
-
      * Extracts the users query from the URL.
 
-
      */
 
-
      function getQuery() {
 
-
        var url = '' + window.location;
 
-
        var queryStart = url.indexOf('?') + 1;
 
-
        if (queryStart > 0) {
 
-
          var parts = url.substr(queryStart).split('&');
 
-
          for (var i = 0; i < parts.length; i++) {
 
-
            if (parts[i].length > 2 && parts[i].substr(0, 2) == 'q=') {
 
-
              return decodeURIComponent(
 
-
                  parts[i].split('=')[1].replace(/\+/g, ' '));
 
-
            }
 
-
          }
 
-
        }
 
-
        return '';
 
-
      }
 
       function onLoad() {
       function onLoad() {

Latest revision as of 14:52, 29 August 2010

UCL IGEM 2010

RETURN TO IGEM 2010

Loading...

Retrieved from "http://2010.igem.org/Team:UCL_London/Search"