Purchase Advertising On AWT
 Upload & Sell Your Software
 Upload & Sell Your eBook
 Enter The AWT Control Panel  Contact Applied Web Tools
 Sell Your eBook @ The PDF Store  Password Troubles? Click Here!
Knowledge Center
Want to write for Applied Web Tools? Send your Writer's Query to
Editor@AppliedWebTools.net for details.
HTML
Reference
&
Tutorial
CSS
Reference
&
Tutorial
DOM
Reference
&
Tutorial
JavaScript
Reference
&
Tutorial
50+ Programming Examples
Use HTML, CSS, DOM & JavaScript Together
Misc. Essays & Documents
You'll Find Just About Anything In Here
50+ Web Page Constructions
Learn the Art of Using HTML, CSS, DOM & JavaScript Together
 Changing Background Colors
 Event Triggering With onLoad
 Disabling The Right Click
 DOM Driven Color Changing
 Switching Images
 innerHTML Attribute Access
 Change With innerHTML
 Changing Positions
 Change Position With onMouseMove
 Change Text Position
 Interactivity Skills
 Type-writing A Message
 Auto-changing Text Size
 Making Text Scroll
 Blinking Text
 Simple Form Authentication
 Change Background Color Of An INPUT
 Change Text Color Of An INPUT
 Change Background Image Of An INPUT
 Select All Checkboxes
 Select Color Of The Submit Button
 Change Text Color Of A Submit Button
 Insert Background Image To A Button
 Change Color Of Drop Down List
 Change Text Color Of A Drop Down List
 Change Color Of A TEXTAREA
 Change The Text Color Of A TEXTAREA
 Insert An Image Into A TEXTAREA
 Change The Size Of An Image
 Change The Source Of An Image
 Change The Position Of An Image
 Change The Background Image
 Moving Images Around The Page
 Drag & Drop An Image
 A Simple Image Viewer
 A Shaking Image
 A Digital Clock
 Drop Down List Link
 Top Drop Down Menu
 Always On Top Menu
 Inset Border Buttons
 A Description Generating Menu
 An Image Generating Menu
 A Horizontal Sliding Menu
 A Click Horizontal Sliding Menu
 Returning Cursor Co-ordinates
 Making Text Follow The Cursor
 Attaching An Image To The Cursor
insert a background image into a textarea

Inserting a background image into your textarea is an effective way to brand your site with a unique look and feel. Use any image format supported by the browser. The style.background=url attribute is used to give the location of the file and may be an absolute or relative URL.

The style.background attribute acts like the background=url attribute you might use with the BODY tag. The image is displayed at its actual size and any overlapping areas aren’t shown if the textarea is smaller than the image. If the textarea element is larger than the image, it will be repeated (tiled).

<html>
<head>

<script type="text/javascript">
function bgChange(bg) {
document.getElementById('x').style.background="url(" + bg + ")";
}
</script>

</head>

<body>

<p>This example demonstrates how to insert a background image to a textarea</p>
<p>Mouse over these images and the textarea will get a background image.</p>

<table width="300" height="100">
<tr>
<td onmouseover="bgChange('paper.jpg')" background="paper.jpg"></td>
<td onmouseover="bgChange('bgdesert.jpg')" background="bgdesert.jpg"></td>
</tr>
</table>

<form>
<textarea id="x" rows="5" cols="20"></textarea>
</form>

</body>
</html>


I’ve seen a few sites that use the background image as an informative indicator to the user. It is entirely possible to count the number of characters being typed in the textarea and change the image that is displayed according to these counted values. A progress bar can be displayed as the background image as the user types, giving them the idea of how much more characters they have to add if you’ve specified a minimum or the amount of characters they have left if you’ve specified a maximum.
I do not employ cookies or tracking devices of any kind