36 lines
954 B
JavaScript
36 lines
954 B
JavaScript
|
|
function addEvent(object, eventName, do_function) {
|
|
|
|
if (typeof (object) == "string") object = document.getElementById(object);
|
|
|
|
if (!object) { alert('No object in function addEvent!'); return; }
|
|
|
|
if (object.addEventListener) {
|
|
|
|
object.addEventListener(eventName, do_function, false);
|
|
|
|
} else {
|
|
|
|
object.attachEvent('on' + eventName, do_function);
|
|
|
|
}
|
|
|
|
}
|
|
addEvent(
|
|
|
|
window,
|
|
|
|
'load',
|
|
|
|
function () {
|
|
|
|
function HideLoadingView() {
|
|
var slv = document.getElementById('ShowLoadingView');
|
|
if (slv) slv.style.display = 'none';
|
|
}
|
|
setPREVIEW = function () {
|
|
SetTab('panel_PREVIEW');
|
|
document.getElementById('previewPDF').innerHTML = '<iframe style="border:none;width:100%;height:1200px;" frameborder="no" src="index.php?module=EcmPrepaymentInvoices&action=previewPDF&to_pdf=1&method=I&record=' + document.forms.DetailView.record.value + '#zoom=75">Yours browser not accept iframes!</iframe>';
|
|
}
|
|
}
|
|
); |