Saturday, February 05, 2005

Setting the focus on the HTML TEXTAREA to the left

When you click on the HTML TEXTAREA control you can write in it starting from the middle. If you want to write starting from the left you can easily configure it.

Here is a simple java script function that is called on the onfocus event of the HTML TextArea controls.


function WriteFromLeft()

{
// The name of the text area is txtArea1 and the name of the form is Form1

document.Form1.txtArea1.value = "";

}

yup thats it just remember that this function is called on the "onfocus" event of the TextArea control.

No comments: