I have used custom error messages with page titles in the past with the following syntax:
var pageTitle = $(‘#MyPageTitle’);
var editor = pageTitle.data(‘object’).editor;
editor.handleMessages([{message:‘Account billing address is incomplete’, severity:‘ERROR’}]);
I recently tried using 2 different page titles with 2 different Ids to have 2 different error message locations like so:
var pageTitle = $(‘#MyPageTitle’);
var editor = pageTitle.data(‘object’).editor;
editor.handleMessages([{message:‘Account billing address is incomplete’, severity:‘ERROR’}]);
var errorPageTitle = $(‘#MyErrorPageTitle’);
var errorEditor = errorPageTitle.data(‘object’).editor;
errorEditor.handleMessages([{message:‘Account billing address is incomplete’, severity:‘ERROR’}]);
It seemed to work for a bit, but recently I’ve been getting errors on this line:
var errorEditor = errorPageTitle.data(‘object’).editor;
that editor can’t be read/ it’s undefined. Can this not be used 2 times on one page?
Question
Multiple data('object').editor" editors"
This topic has been closed for replies.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.