HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/PHerau/toptennisteam.be/wwwroot/js/dnn.controls.dnninputtext.js
//DNNInputText is a dynamically loaded script used by the DNNLabelEdit control
dnn_control.prototype.DNNInputText = function (bMultiLine)
{
	if (bMultiLine)
		this.control = document.createElement('textarea');	
	else
	{
		this.control = document.createElement('input');
		this.control.type = 'text';
	}
	this.container = this.control;
	this.initialized = true;
	this.supportsMultiLine = bMultiLine;
	this.isRichText = false;
	this.loaded = false;
}

dnn_control.prototype.DNNInputText.prototype = 
{
focus: function ()
{
	this.control.focus();
	var iChars = this.getText().length;
	if (this.control.createTextRange)
	{
		var oRange = this.control.createTextRange();
		oRange.moveStart('character', iChars);
		oRange.moveEnd('character', iChars);
		oRange.collapse();
		oRange.select();
	}
	else
	{
		this.control.selectionStart = iChars;
		this.control.selectionEnd = iChars;
	}
	//this.control.select();
},

ltrim: function (s) 
{ 
	return s.replace(/^\s*/, "");
},

rtrim: function (s) 
{ 
	return s.replace(/\s*$/, "");
},

getText: function ()
{
	return this.control.value;
},

setText: function (s)
{
	this.control.value = this.rtrim(this.ltrim(s));
}
}
dnn.extend(dnn_controls.prototype, dnn_control.prototype);
//dnn.controls = new dnn_controls();