SharePoint 2007 Error when i click on Search button - SendSoap is null or undefined

36 views Asked by At

I have a SharePoint site, I have built a custom page and added a CoreResultsWebPart. When i click on search button it gives me an error "Error: The value of the property 'SendSoap' is null or undefined, not a Function object"

the code where it fails is:

    <script type='text/javascript'>
        <!--
        var QLC=0;
        function AddHandler(e, f){
         var o=eval(e);
         eval(e+'=o?function(){o();f();}:f;');
        }
        function WireLinks(url, action, env, start){
         var links=document.body.getElementsByTagName('a');
         for (var i=0;i<links.length;i++)
          if(/^(CSR|BBR|SRP)_/.exec(links[i].id)) links[i].onclick = function(){SendClick(url,action,env,start,this);QLC=1;};
         AddHandler('window.onunload',function(){if(!QLC)SendSoap(url,action,env);});
        }
        AddHandler('window.onload',function(){WireLinks('[SiteName]/_vti_bin/search.asmx','urn:Microsoft.Search/RecordClick','<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><RecordClick xmlns="urn:Microsoft.Search"><clickInfoXml><![CDATA[<i xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" a="true" d="false" g="d964e0eb-7f03-42a3-9896-ea288900e1ba" h="0" m="0x42B62CE93EF8E4BD98E9E9F329ABBF390C38CF41,3722941504" n="0" p="N/A" q="efaultproperties,\u0027\u002b\u05DC\u05E9\u05DC\u05D9\u05D8\u05D4" t="2016-12-22T16:25:04.5281681\u002b02:00" u="[]/Pages/CustomSearchPage.aspx" v="0" x="0" xmlns="urn:Microsoft.Search"><f>false</f><r>0</r><s>aHfnSearchScopBestPractice</s><s>All Sites</s></i>]]></clickInfoXml></RecordClick></soap:Body></soap:Envelope>',0);});
        // -->
</script>
0

There are 0 answers