Javascript Replace HTML Characters
<p>I am a total noob on Javascript. What I want is to have a search form, and the input to the form should change the url, then it will open a new tab with the new url.</p>

<p>For example, when I enter 'production', the url will become <a href="http://production-test.com/test/" rel="nofollow">http://production-test.com/test/</a>, then a new tab will open with the new url.</p>

<p>I know that this should be in Javascript, but I don't know how it will be able to return back the new url. </p>

<p>I have this html so far which does not work at all.</p>

<pre><code> &lt;script language="javascript"&gt;
 function change_url(result) {
     #var result = document.getElementById().value;
     var new_url = "http://" + result + "-test.com/test/';
     # open new window with the new url
 }

 &lt;form id="search-box" name="search_box" method="get" 
action="http://variable-test.com/test/" target="_blank""&gt;

 &lt;input id="search-text" type="text" autocomplete="off" 
class="form-text-box no-focus" name="c" value="" aria-haspopup="true"&gt;
 &lt;input type="radio" id="rel" name="sort" value="1" onchange="saveType('rel');" /&gt;&lt;span data-message="TypeOp1"&gt;Relevance&lt;/span&gt;&lt;br /&gt;

 &lt;input id="search-button" type="submit" /&gt;
</code></pre>
