URL rewrite problem in .js Javascript libraries
Hi All,
I created a small HTML page that contained a javascript function to confirm that the portal rewrote the url inside the javascript function. This test worked as expected. I then removed the javascript function from the HTML page and put it in a separate javascript library (i.e. library.js) and included the .js library from the HTML page. This test failed.
All the URLs on the HTML page were re-written, as expected, but the .js library file was untouched.
These tests confirm to me that the portal gateway does NOT re-write URLs contained in separate .js javascript libraries that are included from an HTML page.
At this point, I am quite certain that the portal server either a) does NOT re-write URLs in .js javascript libraries, or b) does re-write the URLs in these libraries but needs to be explicitly configured to do so, which in our case, must not be configured
properly. So we need help to determine what it does or does not support and/or what gateway configuration changers are needed.
Our Javascript libraries are included as follows:
-
<script language="Javascript">
DynAPI.setLibraryPath('/apps/js/lib/');
DynAPI.include('dynapi.api.*');
DynAPI.include('dynapi.ext.inline');
DynAPI.include('dynapi.ext.keyevents');
DynAPI.include('apps.util.mouseEvents');
DynAPI.include('apps.util.validate');
DynAPI.include('apps.util.validators');
DynAPI.include('apps.util.formUtils');
DynAPI.include('apps.util.imageSwap');
DynAPI.include('apps.util.dateField');
DynAPI.include('apps.gui.button');
DynAPI.include('apps.gui.tooltip');
DynAPI.include('apps.gui.toolbar');
DynAPI.include('apps.util.twoList');
</script>
Question: Does portal gateway support the re-write of URLs in .js javascript libraries, Or do we need to explicitly configure the gateway for each library include?
Look forward to your reply.
Chris Wilt
TransCanada

