Implementing reportviewer find function with javascript
<p>On my page, I have reportviewer.</p>

<pre><code>&lt;rsweb:ReportViewer ID="ReportViewer1" runat="server" 
    CssClass="ReportViewer" AsyncRendering="false" 
    OnPreRender="RptViewer_PreRender" EnableViewState="true" 
    Width="100%" PageCountMode="Actual"
    WaitMessageFont-Size="1.2em" ShowToolBar="true" 
    Visible="true"
    InteractiveDeviceInfos="(Collection)"&gt;  
    &lt;LocalReport&gt;&lt;/LocalReport&gt;
&lt;/rsweb:ReportViewer&gt;
</code></pre>

<p>I'm trying to integrate it with my toolbar that will also have functionalities provided by reportviewer toolbar. So I'm not using reportviewer's toolbar. </p>

<p>On my toolbar I have image and textbox:</p>

<pre><code>&lt;img src="img/search.png" alt="Find" onClick="findString()" /&gt;
&lt;asp:TextBox id="txtSearch" runat="server"&gt;&lt;/asp:TextBox&gt;
</code></pre>

<p>Here's my script:</p>

<pre><code>function findString() {
    var viewer = $("#ReportViewer1");
    var searchText = document.getElementByID('&lt;%=txtSearch.ClientID&gt;');
    if (!viewer.get_isLoading() &amp;&amp; viewer.get_reportAreaContentType() == Microsoft.Reporting.WebFormsClient.ReportAreaContent.ReportPage) {
        viewer.find(str);
    }
    return false;
}

function nextHit() {
    var viewer = $("#ReportViewer1");
    if (!viewer.get_isLoading() &amp;&amp; viewer.get_reportAreaContentType() == Microsoft.Reporting.WebFormsClient.ReportAreaContent.ReportPage) {
        viewer.findNext();
    }
    return false;
}
</code></pre>

<p>In function <code>findString</code>, I'm getting (I saw in firebug) <code>isLoading</code> is a property &amp; not a function. Am I missing something? </p>

<p>If I change my function as:</p>

<pre><code>function findString() {
    var viewer = $("#ReportViewer1");
    var searchText = document.getElementByID('&lt;%=txtSearch.ClientID&gt;');

        viewer.find(str);

    return false;
}
</code></pre>

<p>I don't see that error, but don't see the search text highlighted in the report. Help.</p>
