How do you replace content without losing focus?
<p>For example:</p>

<pre><code>&lt;input type="text" name="test" onChange="document.formname.test.value=.document.formname.test.value.replace('something','something else')" /&gt;
</code></pre>

<p>The replace function works but it loses focus on every change</p>

<p>How do you make it not lose focus?</p>

<p>What I'm trying to do is make it so that certain text is immediately replaced with new text when its typed but you can continue typing</p>
