Page 1 of 1

Javascript: Change text size in text area

Posted: Wed Aug 31, 2005 1:30 pm
by Lixas
using this simple Jscript, u can change text size in textarea ir in input line. This example will be with textarea:

Code: Select all

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

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


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

Posted: Fri Sep 02, 2005 5:22 am
by SHAdmin
Sorry for interrupting your topic Lixas, but this was necessary.

All posts that were as replies to this thread have been deleted. Please read http://www.smokyhosts.com/forums/viewtopic.php?t=920 before making any posts here. As per the rules, all the support and comments for the scripts posted in this category are supposed to be held at http://www.smokyhosts.com/forums/viewforum.php?f=22 . This perticular thread will be reserved only to Lixas and this perticular scripts updates/upgrades.

Anyways good script Lixas, you can continue to reply to this thread and carry out the further improvements/updates/upgrades for this script in this thread.

Posted: Fri Oct 07, 2005 12:48 am
by mohumben
Dear admin, please move this thread to some other forum.

But there are simple ways to change the textarea or other input's style (using CSS), for example:

Code: Select all

<textarea style="background-color: lightblue; font-family: arial"></textarea>
Self explanatory.