Call javascript function with an href
<p>i'm developing a website, but i'm not an expert when it comes to javascript. I'm using a script that i found on the internet for searching the page for a text string. To call this function i use the following code:</p>

<pre><code>  &lt;div class="pesquisa" id="pesquisa"&gt;&lt;form name="f1" action=""
  onSubmit="if(this.t1.value!=null &amp;&amp; this.t1.value!='')
  findString(this.t1.value);return false"&gt;
  &lt;input name="t1" type="text" /&gt;&lt;/form&gt;
  &lt;/div&gt;
</code></pre>

<p>this is working well, when i enter text and click enter he finds it on the page. 
Now i have a "button" next to it that is represented by:</p>

<pre><code>&lt;a href='javaScript:document.f1.findString(this.t1.value)'&gt;
&lt;div class="enviar" id="enviar"&gt;Pesquisar&lt;/div&gt;&lt;/a&gt;&lt;/div&gt;
</code></pre>

<p>I want this "button" to call the same function with the value inserted in the form. But it is not working this way. 
Any ideas on how this can be made ?</p>

<p>Thanks in advance, Cláudio</p>
