*Thanks for the reply.*
**
*Actually my script is included in the design page.No particular .js page.*
*I have already done the same counter in the other pages wer im not adding
master page.*
*In the current pahe i adding master page and im not able to get any result.
*
*Any Idea?*
On Tue, Aug 3, 2010 at 1:46 PM, Gunawan Hadikusumo <
[email protected]> wrote:

> 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
>
>


-- 
 ****************
**Thanks & Regards,
Jeena Ajiesh
Email: [email protected]
           [email protected]*

Reply via email to