Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Using javascript within a custom menu item CGI
tvaughan
Hi,
This is kind of a two-parter.
The short question is: within my custom cgi script, if I use the syntax:
< HEAD>
< SCRIPT language="JavaScript" src="/iw-bin/timeout.js">< /SCRIPT>
< /HEAD>
To replace some big ugly javascript code that used to spit out directly from within my cgi, the javascript doesn't work. I'm pretty sure it isn't a matter of the javascript not working and that it's more a matter of the file "timeout.js" not being found.
Shouldn't I be able to reference a *.js file in my httpd/iw-bin directory?
Do I need to configure the httpd that ships with Interwoven to enable this?
That said, when I look at my show_env.cgi, I notice that my "DOCUMENT_ROOT" is set to "/teamsite/iw-home/iw-webd/htdocs" which is very interesting, because when I refer to "/iw-icons" in my custom cgis, those images get pulled in just fine. This would leave me to believe that the doc root is actually "/teamsite/iw-home/httpd". Who's right?
Thanks,
Tom
Find more posts tagged with
Comments
james1
It would be nice to know what version of TeamSite you are using.
Your iw-webd is probably configured to allow only CGI programs to be accessed under "/iw-bin/". Therefore, you could put your .js file under IWHOME/httpd/iw/ (or a subdirectory of your creation), which can be accessed as "/iw/...". That should work just fine. I find it odd that you want to put a JavaScript file in the "iw-bin" directory in the first place; the "iw" directory (or some subdirectory of it) seems a more natural place.
While it may be true that your document root is set to IWHOME/iw-webd/htdocs, you should note that /iw/, /iw-bin/, and /iw-icons/ have aliases set up for them to point to the appropriate directories under IWHOME/httpd/. Just look a few lines further than the DocumentRoot line in IWHOME/iw-webd/conf/httpd.conf, and see for yourself.
Hope this helps.
-- James
--
James H Koh
Interwoven Engineering