How To Create Text Area with Select All

Posted by Lasantha Bandara File Under : html, java script, text boxes 2 Comments

1.Log in to your dashboard--> layout- -> Edit HTML

2.Scroll down to where you see  </head>  tag.

3.Now add below code before  </head>  tag.

<script type="text/javascript">

function selectAll()
{
document.form1.demo.focus();
document.form1.demo.select();
}

</script>

4.Save your template.

5.Go to layout-->Page Elements.

6.Click on 'Add a Gadget' on the sidebar.

7.Select 'HTML/Javascript' and add the code given below and click save.

<form name="form1" >
<textarea cols="25" rows="10" name="demo">

INSERT YOUR CONTENT HERE

</textarea>
<input type="button" name="selectit" value="Select All" onclick="selectAll ();">
</form>

Note : Remember to replace  INSERT YOUR CONTENT HERE  with your real content.

Now you are done.

2 thoughts on “How To Create Text Area with Select All

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.