Forum Discussion

MichaelCurtis's avatar
MichaelCurtis
Qrew Cadet
8 years ago

Code Page

Can I link my app.js file if both index.html and app.js are on the code page? Like this
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-COMPATIBLE" content="ie=edge">
<title>Document</title>
</head>
<body>

<script src="app.js"></script>
</body>

</html>
  • You can reference the app.js file saved as a code page in the application with DBID as follows:

    <script src="DBID?a=dbpage&pagename=app.js"></script> 

    Notes:

    (1) for readability you should use relative URLs (as indicated above) instead of absolute URLs.

    (2) for readability you should use &pagename instead of &pageID.

    (3) If you copy the application you will need to manually modify the hard-coded DBIDs or your new application will be referencing the old code pages.