How to replace the 1's in "document.search1.search_text1.value;" with the function parameter in javascript?
<p>I have skimmed down my code to make it easier to read but this is basically what I have and it is working fine.  </p>

<pre><code>function findmatch() {

var value = document.search1.search_text1.value;

}
</code></pre>

<p>But what I want to do is have a parameter x and replace the 1's with the x but I can't seem to do it. I thought the following would work but had no luck with it.</p>

<pre><code>function findmatch(x) {

var value = document.'search'+x.'search_text'+x.value;

}
</code></pre>

<p>Any suggestions would be greatly appreciated.</p>

<p>Thanks.</p>
