Change the method name from giveDefaultText to enableDefaultText.

thanks,
Chanaka

On Wed, Feb 23, 2011 at 10:16 PM, Chanaka Jayasena <chan...@wso2.com> wrote:

> Hi all,
>
> During recent UI reviews, introducing default text for text boxes,
> which disappears with user interaction was suggested.
>
> I added this to UI core. To add this functionality to any text box follow
> the three steps below.
>
> 1.-  Import the following two js files in to the jsp file.
>
> <script src="../yui/build/yahoo-dom-event/yahoo-dom-event.js"
> type="text/javascript"></script>
> <script src="../admin/js/widgets.js" type="text/javascript"></script>
>
> 2 - Make sure alt, id, value attributes are present and they are defined as
> follows.( Alt tag holds the default text value for that particular field.
> Value tag is required and it can initially be empty or it can hold a value.)
>
> ex: <input type="text" id="txtBoxId" alt="Enter Name"  value=""  />
>
> 3 - Call this js method to put every things in to action.
>
> giveDefaultText("txtBoxId");
>
> thanks,
> Chanaka
>
_______________________________________________
Carbon-dev mailing list
Carbon-dev@wso2.org
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev

Reply via email to