Spell Check Isn't working properly with ino path web forms.

Hi,

I had used below script to enable spell check on infopath forms,lot of text and people pikecr value under farm as list.

<script language=javascript src=/_layouts/1033/SpellCheckEntirePage.js?rev=zYQ05cOj5Dk74UkTZzEIRw%3D%3D type=text/javascript></script>

<script language=javascript type=text/javascript>

function CheckSpelling()   {

SpellCheckEntirePage(/_vti_bin/SpellCheck.asmx, /_layouts/SpellChecker.aspx);

}

</script>

<a onclick=CheckSpelling(); href=javascript:><img alt=Spell Check src=_layouts/1033/images/RTE2SPCHK.GIF style=border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px/></a>

above script is working fine with test box and rich text box,but when come on  people picker i am getting below message..

May 25th, 2015 7:30am

Hi,Got the solution,

Problem has been fixed,with used belwo script:

function disableSpellCheckOnPeoplePickers() {
    var inputs = document.getElementsByTagName('INPUT');
 
    for (var index = 0; index < inputs.length; index++) {
        var input = inputs[index];
        if (input.parentNode
                  && input.parentNode.tagName == 'SPAN'
                            && input.parentNode.getAttribute("NoMatchesText")) {
            disableSpellCheckOnPeoplePickersAllChildren(input.parentNode);
        }
    }
}
 
function disableSpellCheckOnPeoplePickersAllChildren(elem) {
    if (!elem) return;
 
    var childrenToCheck = elem.getElementsByTagName('TextArea');
 
    for (var i = 0; i < childrenToCheck.length; i++) {
        var child = childrenToCheck[i];
        child.setAttribute('excludeFromSpellCheck', true);
        disableSpellCheckOnPeoplePickersAllChildren(childrenToCheck[i]);
    }
}


Free Windows Admin Tool Kit Click here and download it now
May 25th, 2015 7:44am

Hi Hasan,

Thank you for sharing this with us, and it will help others who have met with this issue.

Best regards,

Victoria

May 25th, 2015 10:43pm

Hi Victoria,

Above script is working perfect for single user people picker,but with multiple user allow in people picker  this case script is not running.

Free Windows Admin Tool Kit Click here and download it now
September 10th, 2015 1:52am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics