I noticed that the Chapters/Indigo search I submitted a while ago was no
longer working, so here is an updated version, switches and all! (Please
let me know if I've made any mistakes in it :)

Sarah
<search function="chap">
  <name>Chapters/Indigo</name>
  <category>Shopping</category>
  <contributor>Sarah Sweeney</contributor>
  <link>http://www.chapters.indigo.ca/</link>
  <email>[EMAIL PROTECTED]</email>
  <description>
		Chapters/Indigo search.<br/>
		<div class="helpboxDescLabels">Switches:</div>
		<table class="helpboxDescTable">
			<tr><td>/all</td><td> - </td><td>Search all.</td></tr>
			<tr><td>/book</td><td> - </td><td>Search books.</td></tr>
			<tr><td>/vhs</td><td> - </td><td>Search VHS videos.</td></tr>
			<tr><td>/dvd</td><td> - </td><td>Search DVDs.</td></tr>
			<tr><td>/movie</td><td> - </td><td>Search VHS videos and DVDs.</td></tr>
			<tr><td>/gift</td><td> - </td><td>Search gifts.</td></tr>
		</table>
		<div class="helpboxDescLabels">Examples:</div>
		<table class="helpboxDescTable">
			<tr><td>chap harry potter /book</td></tr>
			<tr><td>chap the matrix /dvd</td></tr>
		</table>
  </description>
	
  <form name="chapf" method="post" action="http://www.chapters.indigo.ca/search/default.asp";>
    <input type="hidden" name="Search_Method" value="QuickSearch" />
    <input type="hidden" name="Search_Phrase_QuickSearch" />
    <input type="hidden" name="Search_Modifier_QuickSearch" value="QuickSearch" />
    <input type="hidden" name="Search_Catalog" value="Books,Video,DVD,Gifts" />
  </form>
	
  <script><![CDATA[
    function chap(q)
    { var args = parseArgs(q, "all, book, vhs, dvd, movie, gift");
			
      if( nullArgs("chap", q) )
      { return;
			}
		  else if ( args.switches.length == 1 )
      { switch( args.switches[0].name )
        { case "book":
            document.chapf.Search_Catalog.value = "Books";
            break;
          case "vhs":
            document.chapf.Search_Catalog.value = "Video";
            break;
          case "dvd":
            document.chapf.Search_Catalog.value = "DVD";
            break;
          case "movie":
            document.chapf.Search_Catalog.value = "Video,DVD";
            break;
          case "gift":
            document.chapf.Search_Catalog.value = "Gifts";
            break;
          case "all":
          default:
            document.chapf.Search_Catalog.value = "Books,Video,DVD,Gifts";
            break;
        }
      }

      document.chapf.Search_Phrase_QuickSearch.value = args.q;

      submitForm(chapf);
    }
  ]]></script>
  <copyright>
    The following applies if this file is included and distributed with Dave's Quick Search Deskbar:
    Copyright (c) 2002 David Bau; Distributed under the terms of the GNU Public License, Version 2 (http://www.gnu.org/copyleft/gpl.txt)
  </copyright>
  <created_by>
    This search file was initially created on 11/16/02 at 10:59:50
    by Dave's Quick Search Deskbar Search Wizard version 0.9.1 (beta),
    Copyright (c) 2002 Glenn Carr; Distributed under the terms of the GNU General Public License, Version 2
  </created_by>
</search>

Reply via email to