JavaScript does not execute
<p>So in my head> I have the following piece of code:</p>

<pre><code>function dynamicPhoneAddon(){
while(true){
    var phone = document.myform.phone.value;
    document.getElementById('writeme').innerHTML ='&lt;input type="hidden" name="retURL" value="http://URLREMOVED/thankyou.php?customer=' + phone + '"&gt;';
    }
}
</code></pre>

<p>Then I have a body onload="dynamicPhoneAddon()" to call this script. It's supposed to constantly modify the contents of a div id="writeme" by using the value from the phone field of form myform.</p>

<p>However, the script doesn't run. I haven't done any work with javascript before, so I think it's probably something obvious... is it because I'm calling an infinite loop? Or am I trying to do something impossible?</p>

<p>The end result I'm trying to achieve is to make a hidden value that has a link to a URL with a variable (the phone number) at the end.</p>
