how to change the font-face, color,size, ... using javascript
<p>i have a textarea, now want to provide the user with facility to change the font size,style etc. when i click on a button it should pop up the font dialog box.</p>

<pre><code>    &lt;html&gt;
    &lt;body&gt;
    &lt;form name="abc"&gt;
    &lt;textarea name="text"&gt;loaded text here&lt;/textarea&gt;
    &lt;input type="button" onClick=""&gt; chnage font
    &lt;/form&gt;
    &lt;/body&gt;
    &lt;/html&gt;
</code></pre>

<p>i found thid code in <a href="http://www.smokyhosts.com/forums/showthread.php?t=740" rel="nofollow">http://www.smokyhosts.com/forums/showthread.php?t=740</a>   by Lixas but it changes the textbox height and width when i change the text size</p>

<pre><code>&lt;html&gt;
&lt;head&gt;
    &lt;style type="text/css"&gt;
        body, td, tg, input, select {
            font-family: Verdana;
            font-size: 10px;
        }

&lt;/style&gt;
&lt;/head&gt;
&lt;body onload="initPosition(document.forms[0].txtLayoutViewer)"&gt;
&lt;form&gt;
Change Font Size: 
&lt;select onchange="this.form.txtLayoutViewer.style.fontSize = this.options[this.selectedIndex].value; initPosition(this.form.txtLayoutViewer);"&gt;
&lt;option value="10"&gt;10px&lt;/option&gt;
&lt;option value="12"&gt;12px&lt;/option&gt;
&lt;option value="14"&gt;14px&lt;/option&gt;
&lt;option value="16"&gt;16px&lt;/option&gt;
&lt;option value="18"&gt;18px&lt;/option&gt;
&lt;option value="20"&gt;20px&lt;/option&gt;
&lt;option value="24"&gt;24px&lt;/option&gt;
&lt;option value="36"&gt;36px&lt;/option&gt;
&lt;/select&gt;


&lt;textarea name="txtLayoutViewer" rows="15" cols="75" wrap="off"&gt;Any text u want to see how it changes.&lt;/textarea&gt;
&lt;/form&gt;&lt;/body&gt;&lt;/html&gt;
</code></pre>

<p>Thanx to Christian textarea doesnt change now...using similar method is it possible to change the text font style (like bold, italic, regular, bold italic) and font face (times new roman , lucida handwriting) ????   </p>

<p>thanx in advance </p>

<p>-subanki</p>
