Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

js file load problem from apex

matt_bJan 13 2012 — edited Mar 13 2012
Hi,
I've got some javascript to render chemical structures, which I've used in previous version of apex but am having issues in 4.1, oracle 11 x64, win 2008 server. I must be missing something simple, so please bear with me.
Here are the first two lines of some html code that runs fine in it's own little .html text file in IE or firefox :

<script language="JavaScript" src="C:\Program Files\CambridgeSoft\ChemOffice2008\ChemDraw\Html\chemdraw.js"></script>
<script> cd_includeWrapperFile("C:/Program Files/CambridgeSoft/ChemOffice2008/ChemDraw/Html"); </script>

it loads up the chemdraw.js file from the installed location on the local client, then calls one function.
If I put this into Apex in any number of ways - all on it's own html region, splitting the 1st line into the Javascript header section of the page, into the header of the page template, etc., I always get the same result: in IE, the page error is about invalid characters on the 1st line, which some googling implied is actually that it cannot load the chemdraw.js file, and subsequent errors about object not found must be because it can't load the file.

I found this article :
http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21674/bldapp_js.htm#BABIGDIJ

Which says to do it like this :
<script src="/my_images/custom.js" type="text/javascript"></script>

Which I did for the 1st line, and got exactly the same result. My path is the C:\Program Files...\.... which I tried with both forward and backward slashes.
Do js files have to live on the apex server under /i/ somewhere? Or what is the above "/my_images/custom.js" path from the oracle documentation relative to?
Is there a security or file system permission issue I am missing? This happens in firefox 3.x and ie7 & 8, win xp and 7.

Thanks much,
Matt
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 10 2012
Added on Jan 13 2012
4 comments
1,466 views