how to pass the javascript variable to textbox?
<p>i would like to ask a question.</p>

<p>how can i pass the javascript generated code to the textbox "code" ?</p>

<p>I surf the internet but I cannot find the answer</p>

<p>I hope all of you can help me.</p>

<p>thanks!!</p>

<pre><code>  &lt;form&gt;&lt;input name="code" type="text" value="" &gt;
                &lt;script&gt;
                    function makeid()
                    {
                        var text = "";
                        var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";

                        for( var i=0; i &lt; 6; i++ )
                            text += possible.charAt(Math.floor(Math.random() * possible.length));

                        alert(text);
                        return text;
                    }       
                &lt;/script&gt;
                  &lt;input type="button" style="font-size:9pt" value="Generate Code" onclick="makeid()"&gt;
                  &lt;/input&gt;&lt;/form&gt;
</code></pre>
