Selasa, 12 Mei 2009

making Text area With Auto highlight Mouse Over


Kang Rohman once posted an article about how to make text area at the post Making text area. The article explained two variations of text area, they are the normal text area and text area with highlight button so when visitors click on the button, all texts in the area will be highlighted and ready to be copied. Besides the two variations, there is still another variation; it is the text area with auto highlight when the mouse of visitor is over it. Below is the example, please point your mouse over the text area below:

 

 

You can see that when your mouse is pointed over the text in the text area, automatically the entire text will be highlighted and ready to be copied.

In order to make text area with auto highlight mouse over as above, you only need to write the script as follows:

<textarea rows="5" cols="25" onfocus="this.select()" onmouseover="this.focus()" style="display: inline;" name="txt" onclick="this.focus();this.select()">

Save your text or code here

</textarea>



 



You can change the rows value for the height of text area, and cols value for the width of text area.



If you want to place the text area in your posts, you should place it when you are in the position of Edit HTML, not Compose. If you want to place it on sidebar, you can place it on the gadget of HTML/JavaScript.







0 komentar:

Posting Komentar

Advertisement

 

Copyright 2008 All Rights Reserved Revolution Two Church theme by Brian Gardner Converted into Blogger Template by Bloganol dot com