just make sure you set the permission of javascript folder to everyone
On Tue, Aug 3, 2010 at 2:41 AM, Jeena Ajiesh <[email protected]> wrote:
> *Dear Friends,*
> *I need to use a text counter in an aspx page.*
> *I wrote the javascript, but the counter s not showing when the program is
> runed.*
> *The page has included a master page.*
> *Where should i include this coding?*
> *It didnt worked when i placed it in contentplaceholder,** in UpdatePanel
> and Script Manager.*
> *Can anyone help?*
> *Code:*
> *
>
> <
> script language="javascript" type="text/javascript">
>
> function
> textCounter(field, countfield, maxlimit) {
>
> if
> (field.value.length > maxlimit) // if too long...trim it!
>
> field.value = field.value.substring(0, maxlimit);
>
> // otherwise, update 'characters left' counter
>
> else
>
> countfield.innerText = maxlimit - field.value.length +
> " characters remaining";
>
> }
>
> function
> doPaste(control) {
>
> maxLength = control.attributes[
> "maxLength"].value;
>
> value = control.value;
>
> if
> (maxLength){
>
> event
> .returnValue = false;
>
> maxLength = parseInt(maxLength);
>
> var
> oTR = control.document.selection.createRange();
>
> var
> iInsertLength = maxLength - value.length + oTR.text.length;
>
> var
> sData = window.clipboardData.getData("Text").substr(0,iInsertLength);
>
> oTR.text = sData;
>
> }
>
> }
>
> </
> script>*
> * *
>
>
> --
> ****************
> **Thanks & Regards,
> Jeena Ajiesh
> Email: [email protected]
> [email protected]*
>
>
--
johnhadikusumo.blogspot.com
www.miniadverts.com.au