var ID = document.getElementByID('rep_id').value.trim();
[quote]
Message: Object doesn't support this property or method
Line: 604
Char: 2
Code: 0
URI: http://test.localhost/test.js
[/quote]
if(typeof String.prototype.trim !== 'function') {
String.prototype.trim = function() {
return this.replace(/^\s+|\s+$/g, '');
}
}
String.prototype.trim = function() {
return this.replace(/^\s+|\s+$/g,"");
}
String.prototype.ltrim = function() {
return this.replace(/^\s+/,"");
}
String.prototype.rtrim = function() {
return this.replace(/\s+$/,"");
}
//Use Jquery
$.trim( $("#mycomment").val() );
if ($(this).val().trim() == "")
var originalValueTrimmed = $.trim($(this).val());
if (originalValueTrimmed == "") { ... }
if($('#group_field').val().trim()!='')
//should be
if($.trim($('#group_field').val()) != ''){