javascript - How to check for an empty Telerik Kendo editor content -


i have simple form couple of dropdowns multi-select , editor. dropdowns both have initial item has text value of please select , value of ''. on submission have following bit of javascript/jquery checks have values in dropdowns, multi-select , editor.

    var validflag = true;      var dropdownlist = $("#addnew_dteam").data("kendodropdownlist");     if (dropdownlist.value() == "") {         validflag = false;         errormsg = "<li>select team</li>"     }      dropdownlist = $("#addnew_dtype").data("kendodropdownlist");     if (dropdownlist.value() == "") {         validflag = false;         errormsg += "<li>select entry type</li>"     }      var multiselect = $("#msservers").data("kendomultiselect");     if (multiselect.value() == "") {         validflag = false;         errormsg += "<li>add @ least 1 server or select n/a</li>"     }      var editor = $("#diarycomments").data("kendoeditor");     if (editor.value() == "") {         validflag = false;         errormsg += "<li>a comment mandatory</li>"     } 

the code works fine dropdowns , multi-select, check empty editor content not work. editor empty yet if (editor.value() == "") not true.

while editor empty, consider 1 blank space condition if (editor.value() == ' ') (there 1 space between single quote)...

demo

hope work you...


Comments

Popular posts from this blog

SVG stroke-linecap doesn't work for circles in Firefox? -

routes - Laravel 4 Wildcard Routing to Different Controllers -

cross browser - XSLT namespace-alias Not Working in Firefox or Chrome -