Hey guys. I started to write a search for www.iisfaq.com but I am having
trouble getting it to submit the form. Attached is the xml file. It has
been too long since I've written a search. Can anyone help finish this one
up, please?
Thanks,
JB
John W. Bairen, Jr.
www.bairen.net
<search function="iisfaq">
<COMMENT>
Even though this XML search will probably load and is a good start
toward a completed search, please be aware that this search will probably
not work as is and will probably require some changes.
</COMMENT>
<name>IISFAQ</name>
<category>Computers <category>Reference</category></category>
<contributor>John W. Bairen, Jr.</contributor>
<link>http://www.iisfaq.com/</link>
<email>john_at_bairen_dot_net</email>
<description>
Search IISFAQ - "Your best resource to help you Install, Configure &amp; Troubleshoot IIS".
<div class="helpboxDescLabels">Switches:</div>
<table class="helpboxDescTable">
<tr><td>/a - Articles</td><td> - </td><td></td></tr>
</table>
<div class="helpboxDescLabels">Examples:</div>
<table class="helpboxDescTable">
<tr><td></td></tr>
<tr><td></td></tr>
</table>
</description>
<form name="iisfaqf"
method="post"
action="http://www.iisfaq.com/Default.aspx">
<COMMENT> The following field was active (i.e. had focus) when the search was generated. </COMMENT>
<input type="hidden" name="_ctl3:Search" value="" />
<input type="hidden" name="_ctl3:JumpToArticle" value="" />
</form>
<script><![CDATA[
function iisfaq(q)
{
if( nullArgs("iisfaq", q) )
return;
// Parse switches with parseArgs:
// parseArgs usage:
// Arguments:
// q - string from the search function
// expectedSwitches - list or array of the expected switch values
// expandSwitches - optional parameter [default = true] used to determine
// if the switch shortcuts should be expanded (i.e. /f becomes /foo)
// Returns an object with these properties:
// q - the input string with the switches removed
// switches - array of objects with these two properties:
// name: expanded name of the matched switch (i.e. foo as in /foo:bar)
// value: value of switch (i.e. bar as in /foo:bar)
// switch_val - associative array with the switch name as the key with the switch value
// as the value. (i.e. switch_val["foo"] = "bar" as in /foo:bar)
var args = parseArgs(q, "articles");
if ( args.switches.length > 0 )
{
switch( args.switches[0].name )
{
case "a":
document.iisfaqf["_ctl3:JumpToArticle"].value = args.q
break;
default:
document.iisfaqf["_ctl3:Search"].value = args.q
break;
}
}
else
{
document.iisfaqf["_ctl3:Search"].value = args.q
}
// FORM variables for iisfaqf
//document.iisfaqf.__VIEWSTATE.value = "";
// The wizard assigned the search string to this form field value because
// this field was the active element when the search file was generated.
// Change this to args.q if the search string is parsed with parseArgs.
// document.iisfaqf["_ctl3:Search"].value = q;
// document.iisfaqf["_ctl3:JumpToArticle"].value = "";
submitForm(iisfaqf);
}
]]></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 02/03/03 at 15:48:29
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>