PageSourceSearch

https://www.gddinstruments.com/components/com_proforms/js/textareamaxchars.js

js gddinstruments.com collected 2026-10-04 13:23:51 UTC 1,212 bytes, 27 lines download raw bytes

1// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2// @license: Mad4Media Javascipt License - copyright Mad4Media - Fahrettin Kutyol - All rights reserved    ++
3// (re-) publishing or forking for any purpose of commercial or non-commercial use is not allowed.		   ++
4// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
5
6dojo.addOnLoad(function(){
7	console.log("MAX CHARS FOR TEXTAREA");
8	dojo.query(".proformsMaxLength",dojo.byId("proforms_proforms")).forEach(function(textarea){
9		var name = dojo.attr(textarea,"name");
10		textarea.counter = dojo.byId("left_"+name);
11		textarea.maximum = parseInt( dojo.attr(textarea,"maxlength") ) ;
12		textarea.process = function(){
13			var count = this.value.length;
14			if(count > this.maximum){
15				textarea.value = textarea.value.substring(0, this.maximum);
16				count = this.maximum;
17			}
18			var left = this.maximum - count;
19			this.counter.innerHTML = left;			
20		}
21		
22		dojo.connect(textarea,"onkeydown",function(){this.process();});
23		dojo.connect(textarea,"onchange",function(){this.process();});
24		textarea.process();
25		
26	});
27});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.