Advertisements

How To Create Text Area with Select All

Posted by Lasantha Bandara on May 31st, 2009 File Under : html, java script, text boxes2 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.

File Under : html, java script, text boxes

2 Responses to “How To Create Text Area with Select All”

  1. -º_Rzm_º- says:

    GREAT Thank You

  2. Anbu says:

    Great..that was i looking for..Awesome dude!!!

Leave a Reply