I am trying to create a custom method for all Strings.
Later in a function I check the value of a form entryCode:var chkStr = { isBlank: function() { if (this.length < 1) return false; else return true; }, } String.prototype.isBlank = new chkStr.isBlank;
I am getting aCode:if (form.formName.field.value.isBlank) { alert('You left something blank.'); }myStr.isBlank is not a functionerror.



Reply With Quote
Bookmarks