Finally having realised that javascript is case
sensitive, I've managed to sort out my search
(although the coding is still a bit clunky)...

Attached is a new search patus.xml which replaces Phil
Albert's three searches pat.xml, patno.xml and
patapp.xml. This one also includes query filtering to
remove extraneous text which frequently mucks up
people's searches on patent application serial number
and publication number for published applications and
granted patents.

As far as I am aware, Phil is happy with the new
search (although your confirmation to the mailing list
would be appreciated, Phil).


James


        
        
                
___________________________________________________________
Yahoo! Messenger - Communicate instantly..."Ping" 
your friends today! Download Messenger Now 
http://uk.messenger.yahoo.com/download/index.html
<search function="patus">
  <name>US Patent Search</name>
  <category>Legal</category>
  <contributor>James Robertson</contributor>
  <link>http://www.uspto.gov/patft/index.html</link>
  <description>
  Search granted US patents and published US patent applications
    <div class="helpboxDescLabels">Switches:</div>
    <table class="helpboxDescTable">
      <tr><td>/an</td><td> - application serial no</td><td></td></tr>
      <tr><td>/app</td><td> - published application</td><td></td></tr>
      <tr><td>/pn</td><td> - publication no</td><td></td></tr>
    </table>
    Defaults to searching granted patents unless the /app switch is used
    <div class="helpboxDescLabels">Examples:</div>
    <table class="helpboxDescTable">
      <tr><td>patus implement</td></tr>
      <tr><td>patus "sharp implement"</td></tr>
      <tr><td>patus IN/Fred AND whistle</td></tr>
      <tr><td>patus 6123456 /pn</td></tr>
      <tr><td>patus US 6,123,456 /pn</td></tr>
      <tr><td>patus 20030006772 /app /pn</td></tr>
      <tr><td>patus 09/108,452 /an</td></tr>
      <tr><td>patus 108452 /an /app</td></tr>
    </table>
  </description>

  //This is for a boolean search on published patent applications
  //strQuery = "DN/" + strQuery gives a search on patent application publication no
  <form name="patusf_0" ACTION="http://appft1.uspto.gov/netacgi/nph-Parser"; METHOD="GET">
        <INPUT TYPE="HIDDEN" NAME="Query" VALUE="" />
        <INPUT TYPE="HIDDEN" NAME="Sect1" VALUE="PTO2" />
        <INPUT TYPE="HIDDEN" NAME="Sect2" VALUE="HITOFF" />
        <INPUT TYPE="HIDDEN" NAME="u"     VALUE="/netahtml/PTO/search-adv.html" />
        <INPUT TYPE="HIDDEN" NAME="r"     VALUE="0" />
        <INPUT TYPE="HIDDEN" NAME="p"     VALUE="1" />
        <INPUT TYPE="HIDDEN" NAME="f"     VALUE="S" />
        <INPUT TYPE="HIDDEN" NAME="l"     VALUE="50" />
        <INPUT TYPE="HIDDEN" NAME="d"     VALUE="PG01" />
  </form>

  //This is for a boolean search on granted patents
  //strQuery = "PN/" + strQuery gives a search on patent no
  <form name="patusf_1" ACTION="http://164.195.100.11/netacgi/nph-Parser"; METHOD="GET">
        <INPUT TYPE="HIDDEN" NAME="Query" VALUE="" />
        <INPUT TYPE="HIDDEN" NAME="Sect1" VALUE="PTO2" />
        <INPUT TYPE="HIDDEN" NAME="Sect2" VALUE="HITOFF" />
        <INPUT TYPE="HIDDEN" NAME="u"     VALUE="/netahtml/search-adv.htm" />
        <INPUT TYPE="HIDDEN" NAME="r"     VALUE="0" />
        <INPUT TYPE="HIDDEN" NAME="p"     VALUE="1" />
        <INPUT TYPE="HIDDEN" NAME="f"     VALUE="S" />
        <INPUT TYPE="HIDDEN" NAME="l"     VALUE="50" />
        <INPUT TYPE="HIDDEN" NAME="d"     VALUE="pall" />
  </form>
  <script><![CDATA[
    function patus(q) {
      if( nullArgs("patus", q) ) {
        return false
      }

      var args = parseArgs(q, "an, app, pn");
      var strForm = "patusf_1";
      var booPN = 0;
      var strQuery = args.q;

      if( q == "" ) {
        openSearchWindow("http://www.uspto.gov/patft/index.html";)
      } else {
        if ( args.switches.length > 0 ) {
          for( var j=0; j<args.switches.length; j++ ) {
            switch( args.switches[j].name ) {
              case "an":
                for (var i=0, t='', valid="0123456789"; i<strQuery.length; i++) {
                  if (valid.indexOf(strQuery.charAt(i)) != -1) {
                    t += strQuery.charAt(i)
                  }
                }
                strQuery = t ;
                strQuery = strQuery.substring(strQuery.length-6,strQuery.length) ;
                strQuery = "APN/" + strQuery ;
                booPN = 0 ;
                break;
              case "app":
                strForm = "patusf_0";
                break;
              case "pn":
                for (var i=0, t='', valid="0123456789"; i<strQuery.length; i++) {
                  if (valid.indexOf(strQuery.charAt(i)) != -1) {
                    t += strQuery.charAt(i)
                  }
                }
                strQuery = t;
                booPN = 1;
                break;
              default:
                break;
            }
          }
        }

      //if we're searching on Publication Number then set the search string according to whether it's a search of granted patents or published applications
      if (booPN == 1) {
        if (strForm == "patusf_0") {
          strQuery = "DN/" + strQuery;
        } else {
          strQuery = "PN/" + strQuery;
        }
      }

      if (strForm == "patusf_0") {
        var myform = document.patusf_0;
        } else {
        var myform = document.patusf_1;
      }

      myform.Query.value = strQuery;
      submitForm(myform);
    }
  }
  ]]></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>
</search>

Reply via email to