home *** CD-ROM | disk | FTP | other *** search
/ Chip 2003 November / Chip_2003-11_cd1.bin / software / dave / dqsd.exe / searches / bb.xml < prev    next >
Text File  |  2002-11-15  |  4KB  |  111 lines

  1. <search function="bb">
  2.   <name>BestBuy</name>
  3.   <category>Shopping</category>
  4.   <contributor>Glenn Carr</contributor>
  5.   <link>http://www.bestbuy.com/</link>
  6.   <email>glenn at glenncarr dot com</email>
  7.   <description>
  8.   Search BestBuy
  9.   </description>
  10.  
  11.     <comment>
  12.     <div class="helpboxDescLabels">Switches:</div>
  13.     <table class="helpboxDescTable">
  14.       <tr><td>/computers</td><td> - </td><td></td></tr>
  15.       <tr><td>/home</td><td> - </td><td></td></tr>
  16.       <tr><td>/car</td><td> - </td><td></td></tr>
  17.       <tr><td>/personal</td><td> - </td><td></td></tr>
  18.       <tr><td>/photo</td><td> - </td><td></td></tr>
  19.       <tr><td>/soho</td><td> - </td><td></td></tr>
  20.       <tr><td>/appliances</td><td> - </td><td></td></tr>
  21.       <tr><td>/accessories</td><td> - </td><td></td></tr>
  22.       <tr><td>/music</td><td> - </td><td></td></tr>
  23.       <tr><td>/movies</td><td> - </td><td></td></tr>
  24.       <tr><td>/software</td><td> - </td><td></td></tr>
  25.       <tr><td>/games</td><td> - </td><td></td></tr>
  26.     </table>
  27.     <div class="helpboxDescLabels">Examples:</div>
  28.     <table class="helpboxDescTable">
  29.       <tr><td></td></tr>
  30.       <tr><td></td></tr>
  31.     </table>
  32.     </comment>
  33.  
  34.   <form name="bbf"
  35.         method="post"
  36.         action="http://www.bestbuy.com/search/res.asp?m=0&cat=0&scat=0">
  37.     <input type="hidden" name="SV" value="" />
  38.     <input type="hidden" name="SC" value="site" />
  39.   </form>
  40.   <script><![CDATA[
  41.     function bb(q)
  42.     {
  43.       if( nullArgs("bb", q) )
  44.         return;
  45.  
  46.       // Parse switches with parseArgs:
  47.  
  48.       // parseArgs usage:
  49.       // Arguments:
  50.       //    q                - string from the search function
  51.       //    expectedSwitches - list or array of the expected switch values
  52.       //    expandSwitches   - optional parameter [default = true] used to determine 
  53.       //                       if the switch shortcuts should be expanded (i.e. /f becomes /foo)
  54.       // Returns an object with these properties:
  55.       //    q        - the input string with the switches removed
  56.       //    switches - array of objects with these two properties:
  57.       //                  name:   expanded name of the matched switch (i.e. foo as in /foo:bar)
  58.       //                  value:  value of switch (i.e. bar as in /foo:bar)
  59.       //    switch_val - associative array with the switch name as the key with the switch value 
  60.       //                 as the value. (i.e. switch_val["foo"] = "bar" as in /foo:bar)
  61.  
  62.       //var args = parseArgs(q, "computers, home, car, personal, photo, soho, appliances, accessories, music, movies, software, games");
  63.       //if ( args.switches.length > 0 )
  64.       //{
  65.       //  switch( args.switches[0].name )
  66.       //  {
  67.       //    case "computers":
  68.       //      break;
  69.       //    case "home":
  70.       //      break;
  71.       //    case "car":
  72.       //      break;
  73.       //    case "personal":
  74.       //      break;
  75.       //    case "photo":
  76.       //      break;
  77.       //    case "soho":
  78.       //      break;
  79.       //    case "appliances":
  80.       //      break;
  81.       //    case "accessories":
  82.       //      break;
  83.       //    case "music":
  84.       //      break;
  85.       //    case "movies":
  86.       //      break;
  87.       //    case "software":
  88.       //      break;
  89.       //    case "games":
  90.       //      break;
  91.       //    default:
  92.       //      break;
  93.       //  }
  94.       //}
  95.  
  96.       document.bbf.SV.value = q;
  97.       //document.bbf.SC.value = "";
  98.  
  99.       submitForm(bbf);
  100.     }
  101.   ]]></script>
  102.   <copyright>
  103.     The following applies if this file is included and distributed with Dave's Quick Search Deskbar:
  104.     Copyright (c) 2002 David Bau; Distributed under the terms of the GNU Public License, Version 2 (http://www.gnu.org/copyleft/gpl.txt)
  105.   </copyright>
  106.   <created_by>
  107.     This search file was initially created on 11/15/02 at 08:54:59
  108.     by Dave's Quick Search Deskbar Search Wizard version 1.0.0 ,
  109.     Copyright (c) 2002 Glenn Carr; Distributed under the terms of the GNU General Public License, Version 2
  110.   </created_by>
  111. </search>