<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.3" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: Introducing TextBox Limiter Control Ajax Control Toolkit Extender</title>
	<link>http://www.sidarok.com/web/blog/content/2008/05/29/introducing-textbox-limiter-control-ajax-control-toolkit-extender.html</link>
	<description>still believes in coding to make dreams come true</description>
	<pubDate>Thu, 11 Mar 2010 19:39:10 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.3</generator>

	<item>
		<title>By: Alan</title>
		<link>http://www.sidarok.com/web/blog/content/2008/05/29/introducing-textbox-limiter-control-ajax-control-toolkit-extender.html#comment-8499</link>
		<dc:creator>Alan</dc:creator>
		<pubDate>Fri, 25 Sep 2009 14:51:36 +0000</pubDate>
		<guid>http://www.sidarok.com/web/blog/content/2008/05/29/introducing-textbox-limiter-control-ajax-control-toolkit-extender.html#comment-8499</guid>
		<description>This control has been working great until I tried to put it in a Template Column in a datagrid and display many at one time.  I have a page with about 100 rows and a TextBoxLimiter linked to textbox on each row.  In this situation, there is a considerable lag when keying.  It's as if all textboxes in the datagrid are being evaluated on each keystroke, rather than just the textbox being edited.  I tried looking through the source code but I am not versed enough in AJAX and javascript to determine what might be happening.  Any insight is appreciated.  Thanks.</description>
		<content:encoded><![CDATA[<p>This control has been working great until I tried to put it in a Template Column in a datagrid and display many at one time.  I have a page with about 100 rows and a TextBoxLimiter linked to textbox on each row.  In this situation, there is a considerable lag when keying.  It&#8217;s as if all textboxes in the datagrid are being evaluated on each keystroke, rather than just the textbox being edited.  I tried looking through the source code but I am not versed enough in AJAX and javascript to determine what might be happening.  Any insight is appreciated.  Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Knordy</title>
		<link>http://www.sidarok.com/web/blog/content/2008/05/29/introducing-textbox-limiter-control-ajax-control-toolkit-extender.html#comment-6743</link>
		<dc:creator>Knordy</dc:creator>
		<pubDate>Fri, 03 Jul 2009 09:35:45 +0000</pubDate>
		<guid>http://www.sidarok.com/web/blog/content/2008/05/29/introducing-textbox-limiter-control-ajax-control-toolkit-extender.html#comment-6743</guid>
		<description>Again testing on every browser mention above I found that Firefox didn't show the counter (even after the fix of 'mdmasonmbcs'. So guessing his fix worked, but perhaps not on the newest version of FF I conmbined the old code with the new one:

So in the refreshCountTextBox I placed this:

if (countTextBox) {
    if (innerTextEnabled) {
        // Chrome, Internet Explorer, Opera, Safari (for Windows)
        countTextBox.innerText = (maxLength - control.value.length) + "innerText";
    }
    else if (countTextBox.textContent != undefined) {
        // Firefox
        countTextBox.textContent = (maxLength - control.value.length) + "textContent";
    }
    else {
        // Possible bug fix?
        countTextBox.value = (maxLength - control.value.length) + "else";
    }

Which seems to does the trick, to use a label as the counter presentation</description>
		<content:encoded><![CDATA[<p>Again testing on every browser mention above I found that Firefox didn&#8217;t show the counter (even after the fix of &#8216;mdmasonmbcs&#8217;. So guessing his fix worked, but perhaps not on the newest version of FF I conmbined the old code with the new one:</p>
<p>So in the refreshCountTextBox I placed this:</p>
<p>if (countTextBox) {<br />
    if (innerTextEnabled) {<br />
        // Chrome, Internet Explorer, Opera, Safari (for Windows)<br />
        countTextBox.innerText = (maxLength - control.value.length) + &#8220;innerText&#8221;;<br />
    }<br />
    else if (countTextBox.textContent != undefined) {<br />
        // Firefox<br />
        countTextBox.textContent = (maxLength - control.value.length) + &#8220;textContent&#8221;;<br />
    }<br />
    else {<br />
        // Possible bug fix?<br />
        countTextBox.value = (maxLength - control.value.length) + &#8220;else&#8221;;<br />
    }</p>
<p>Which seems to does the trick, to use a label as the counter presentation</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Knordy</title>
		<link>http://www.sidarok.com/web/blog/content/2008/05/29/introducing-textbox-limiter-control-ajax-control-toolkit-extender.html#comment-6732</link>
		<dc:creator>Knordy</dc:creator>
		<pubDate>Thu, 02 Jul 2009 09:22:28 +0000</pubDate>
		<guid>http://www.sidarok.com/web/blog/content/2008/05/29/introducing-textbox-limiter-control-ajax-control-toolkit-extender.html#comment-6732</guid>
		<description>The pasting in other browsers doesn't work because of this code in the _onPaste:

var oTR = control.document.selection.createRange();
var copiedData = window.clipboardData.getData(“Text”).substr(0, insertLength);

The first line I changed to, where I'm not completly sure if this is correct:

if (document.getSelection)
            var selection = document.getSelection(); // Navigator 4.0x
        else if (document.selection &#38;&#38; document.selection.createRange) {
            var oTR = document.selection.createRange(); // IE 4.0x
            var selection = oTR.text
        }
        else
            var selection = window.getSelection(); //other?

The second line I can't find a solution to access the clipboard data in other browsers. For Firefox for example this is because of security reasons. "clipboardData.getData" is only useful for IE.</description>
		<content:encoded><![CDATA[<p>The pasting in other browsers doesn&#8217;t work because of this code in the _onPaste:</p>
<p>var oTR = control.document.selection.createRange();<br />
var copiedData = window.clipboardData.getData(“Text”).substr(0, insertLength);</p>
<p>The first line I changed to, where I&#8217;m not completly sure if this is correct:</p>
<p>if (document.getSelection)<br />
            var selection = document.getSelection(); // Navigator 4.0x<br />
        else if (document.selection &amp;&amp; document.selection.createRange) {<br />
            var oTR = document.selection.createRange(); // IE 4.0x<br />
            var selection = oTR.text<br />
        }<br />
        else<br />
            var selection = window.getSelection(); //other?</p>
<p>The second line I can&#8217;t find a solution to access the clipboard data in other browsers. For Firefox for example this is because of security reasons. &#8220;clipboardData.getData&#8221; is only useful for IE.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Knordy</title>
		<link>http://www.sidarok.com/web/blog/content/2008/05/29/introducing-textbox-limiter-control-ajax-control-toolkit-extender.html#comment-6719</link>
		<dc:creator>Knordy</dc:creator>
		<pubDate>Wed, 01 Jul 2009 09:42:35 +0000</pubDate>
		<guid>http://www.sidarok.com/web/blog/content/2008/05/29/introducing-textbox-limiter-control-ajax-control-toolkit-extender.html#comment-6719</guid>
		<description>Correction (firefox, safari &#38; chrome DOESN'T copy the text in the textbox):

Also only in Internet Explorer the copy function works. Chrome, Safari, Firefox doesn't place the copied text in the box and Opera places the copied text in the box and exceeds the maximum length.</description>
		<content:encoded><![CDATA[<p>Correction (firefox, safari &amp; chrome DOESN&#8217;T copy the text in the textbox):</p>
<p>Also only in Internet Explorer the copy function works. Chrome, Safari, Firefox doesn&#8217;t place the copied text in the box and Opera places the copied text in the box and exceeds the maximum length.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Knordy</title>
		<link>http://www.sidarok.com/web/blog/content/2008/05/29/introducing-textbox-limiter-control-ajax-control-toolkit-extender.html#comment-6718</link>
		<dc:creator>Knordy</dc:creator>
		<pubDate>Wed, 01 Jul 2009 09:40:33 +0000</pubDate>
		<guid>http://www.sidarok.com/web/blog/content/2008/05/29/introducing-textbox-limiter-control-ajax-control-toolkit-extender.html#comment-6718</guid>
		<description>So I've tried to use your extender and tested it on: Internet Explorer 8.0, FireFox 3.0.11, Chrome 2.0.172.33, Opera 9.64, and Safari (for windows) 3.2.1

Firefox and Opera seems to cancel every button event after the max is reached, which for the Backspace isn't useful. I've solved this (maybe not the best solution) by editing the _onKeyPress after the if (e){ adding a if(e.charcode != 8). 8 is the Backspace and it seem to work in all the browsers.

Still Firefox and Opera cancel all other button events like 'delete', 'ctrl-a', the arrow buttons, etc, but other browsers keep working.

Also only in Internet Explorer the copy function works. Chrome, Safari, Firefox does place the copied text in the box and Opera places the copied text in the box and exceeds the maximum length.

Will try to find a solution/workaround for this.</description>
		<content:encoded><![CDATA[<p>So I&#8217;ve tried to use your extender and tested it on: Internet Explorer 8.0, FireFox 3.0.11, Chrome 2.0.172.33, Opera 9.64, and Safari (for windows) 3.2.1</p>
<p>Firefox and Opera seems to cancel every button event after the max is reached, which for the Backspace isn&#8217;t useful. I&#8217;ve solved this (maybe not the best solution) by editing the _onKeyPress after the if (e){ adding a if(e.charcode != 8). 8 is the Backspace and it seem to work in all the browsers.</p>
<p>Still Firefox and Opera cancel all other button events like &#8216;delete&#8217;, &#8216;ctrl-a&#8217;, the arrow buttons, etc, but other browsers keep working.</p>
<p>Also only in Internet Explorer the copy function works. Chrome, Safari, Firefox does place the copied text in the box and Opera places the copied text in the box and exceeds the maximum length.</p>
<p>Will try to find a solution/workaround for this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pedro</title>
		<link>http://www.sidarok.com/web/blog/content/2008/05/29/introducing-textbox-limiter-control-ajax-control-toolkit-extender.html#comment-5681</link>
		<dc:creator>Pedro</dc:creator>
		<pubDate>Tue, 10 Mar 2009 15:38:37 +0000</pubDate>
		<guid>http://www.sidarok.com/web/blog/content/2008/05/29/introducing-textbox-limiter-control-ajax-control-toolkit-extender.html#comment-5681</guid>
		<description>Hi.

When I try your code in Internet Exporer works perfectly, but in Firefox it blocks when i reach to the limit (50) in the code example, as happends to mdmasonmbcs, and the contextual menu and CTRL+V don't work.</description>
		<content:encoded><![CDATA[<p>Hi.</p>
<p>When I try your code in Internet Exporer works perfectly, but in Firefox it blocks when i reach to the limit (50) in the code example, as happends to mdmasonmbcs, and the contextual menu and CTRL+V don&#8217;t work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sidar Ok</title>
		<link>http://www.sidarok.com/web/blog/content/2008/05/29/introducing-textbox-limiter-control-ajax-control-toolkit-extender.html#comment-830</link>
		<dc:creator>Sidar Ok</dc:creator>
		<pubDate>Sat, 16 Aug 2008 12:22:56 +0000</pubDate>
		<guid>http://www.sidarok.com/web/blog/content/2008/05/29/introducing-textbox-limiter-control-ajax-control-toolkit-extender.html#comment-830</guid>
		<description>Hi Michael, 

Sorry for the delay - I was on my annual holidays :) I tried the delete &#38; backspace problem, it does seem to work: could you provide the exact steps so I can repro ? Currently I set the maxlength to 50 and typed 50 chars, saw 0 chars left and pressed backspace, and it worked as expected. 


OTOH, thanks for the firefox fix ! I'll update the source and the article now. Much appreciated!</description>
		<content:encoded><![CDATA[<p>Hi Michael, </p>
<p>Sorry for the delay - I was on my annual holidays <img src='http://www.sidarok.com/web/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> I tried the delete &amp; backspace problem, it does seem to work: could you provide the exact steps so I can repro ? Currently I set the maxlength to 50 and typed 50 chars, saw 0 chars left and pressed backspace, and it worked as expected. </p>
<p>OTOH, thanks for the firefox fix ! I&#8217;ll update the source and the article now. Much appreciated!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mdmasonmbcs</title>
		<link>http://www.sidarok.com/web/blog/content/2008/05/29/introducing-textbox-limiter-control-ajax-control-toolkit-extender.html#comment-761</link>
		<dc:creator>mdmasonmbcs</dc:creator>
		<pubDate>Mon, 04 Aug 2008 11:41:12 +0000</pubDate>
		<guid>http://www.sidarok.com/web/blog/content/2008/05/29/introducing-textbox-limiter-control-ajax-control-toolkit-extender.html#comment-761</guid>
		<description>Good stuff, only one problem - it doesn't handle delete or backspace once you reach the max number of characters.

To get it to work in FireFox I replaced 'textContent' with 'value' in the _refreshCountTextBox function.</description>
		<content:encoded><![CDATA[<p>Good stuff, only one problem - it doesn&#8217;t handle delete or backspace once you reach the max number of characters.</p>
<p>To get it to work in FireFox I replaced &#8216;textContent&#8217; with &#8216;value&#8217; in the _refreshCountTextBox function.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
