Skip to Main Content

ORDS, SODA & JSON in the Database

Announcement

Testing banner

Javascript not able to access static files in Oracle Apex

user1985769Oct 31 2022 — edited Oct 31 2022

I am using Oracle Apex 22.1, ORDS 22.3, Tomcat 8.
The CSS file in the Static Application File #APP_FILES# can be accessed by the Oracle Apex Page. But when I try to access it with the Javascript, it is not able to do so.
I am trying to use the CSS file in the Javascript to print file. Please see my javascript below:
var prtContent = document.getElementById("print-report-card");
var WinPrint = window.open('', 'mark-card', 'left=20,top=20,width=800,height=1200,toolbar=0,scrollbars=1,status=0');

WinPrint.document.write(prtContent.innerHTML);
WinPrint.document.write('<html><head>');
WinPrint.document.write('<link rel="stylesheet" href="#APP_FILES#css/school_markcard.css" />');
WinPrint.document.write('</head><title></title><body >');
WinPrint.document.write('</body></html>');
WinPrint.document.title = document.getElementById("file-name").innerText;
WinPrint.document.close();
WinPrint.focus();
WinPrint.print();
WinPrint.close();

Comments
Post Details
Added on Oct 31 2022
0 comments
47 views