Sharepoint multiline textbox validation
function PreSaveAction() {
var checkItem = $('#<%=lblTrueFalse.ClientID%>').val();
if (checkItem == "true")
{
var value1=GetV3TextField('Approval Comments');
var Approvalvalue="";
if(navigator.appName == "Microsoft Internet Explorer")
{
Approvalvalue=$(value1).closest("span").find("iframe[Title='Rich Text Editor']").contents().find("body").text();
}
else
{
Approvalvalue=$(value1).val();
}
//var Approvalvalue=$(value1).val();
if(Approvalvalue =='' || Approvalvalue ==null)
{
alert('Please add some comments');
return false;
}
else
{
return true;
}
}
}
function PreSaveAction() {
var checkItem = $('#<%=lblTrueFalse.ClientID%>').val();
if (checkItem == "true")
{
var value1=GetV3TextField('Approval Comments');
var Approvalvalue="";
if(navigator.appName == "Microsoft Internet Explorer")
{
Approvalvalue=$(value1).closest("span").find("iframe[Title='Rich Text Editor']").contents().find("body").text();
}
else
{
Approvalvalue=$(value1).val();
}
//var Approvalvalue=$(value1).val();
if(Approvalvalue =='' || Approvalvalue ==null)
{
alert('Please add some comments');
return false;
}
else
{
return true;
}
}
}
No comments:
Post a Comment