I have a js
file, which I minify to perform the due tasks. What happens is that whenever I add this js
to my pages, where it is called, the characters of the Portuguese language are unreadable. So I think it's missing the UTF-8
or ISO-8859-1
. But the question is, how do I place these calls in a single place in my js
file, so that any function within the file makes use of those includes. A single reading. I do not want every method I put this call on unless I can not. Example below, I put only part of my js
, start and part of one of the existing functions:
var tituloMultiBrowser;
(function () {
window.showModalDialog = window.showModalDialog || function (url, arg, opt) {
url = url || ''; //URL
arg = arg || null; //Argumentos
opt = opt || 'dialogWidth:300px;dialogHeight:200px'; //Opções: dialogTop;dialogLeft;dialogWidth;dialogHeight/CSS styles
//Função Chamadora
var caller = showModalDialog.caller.toString();
var doc;
var i = 0;
if (window.parent.name == 'JANELASIS') {
doc = window.parent.document;
}
else {
var janela = window.parent.name;
var janelaPai = window.parent;
while (janela != 'JANELASIS' && i <= 20) {
janelaPai = janelaPai.parent;
janela = janelaPai.parent.name;
i++;
}
doc = janelaPai.parent.document;
}
..............................
}