in 4.x we used SPIDERINCLUDE to accomplish
the "import" - this streams the js into the
html.
<SCRIPT LANGUAGE="JavaScript">
<!--
[[SPIDERINCLUDE SRC=/JavaScript/libvalidations.js]]
</SCRIPT>
in 5.x we're not having any problem with
typical javascript SRC includes.
-Chip
Team NetDynamics
"David Stanwick" <[EMAIL PROTECTED]> wrote:
>
>Was there ever a resolution to this problem? I've done a search of the forum and
>didn't find
>an answer or resolution. We are running into the same problem described below.
>
>[EMAIL PROTECTED] wrote:
>>Grace,>
>>I'm experiencing a similiar problem using Netscape and NetDyn. I have a url
>"/ppdlib/" that has some js files.
>>
>>At the top of my page, I've got the code:
>> <SCRIPT LANGUAGE="JavaScript" SRC="/ppdlib/datefunctions.js"></SCRIPT>
>>
>>This works fine when not using a NetDyn page. However, when I put it in a page and
>try to reference the functions in the datefunction.js file,
>>I get a not found message.
>>
>>Is there something else I need to be doing ? Anyone have any ideas or have run into
>similiar problems ?
>>
>>Thanks.
>>
>>- Joel
>>
>>
>>"Grace Frederick" <[EMAIL PROTECTED]> wrote:
>>>Hi Troy>
>>>In all cases, the reference of any files that are included or imported in
>>>the HTML must be relative to document root of the server.
>>>
>>>Example:
>>>Your site is hosted on an NT server, and the web server is configured so
>>>that the document root for the server is C:\inetpub\wwwroot (as is the
>>>default for the Microsoft PWS).
>>>
>>>The absolute path for the home page (start page for your site) is
>>>C:\inetpub\wwwroot\default.htm
>>>even though it is referenced by http://www.bogusdomain.com/default.htm). If
>>>you wanted to link from any other page to the home page, you could define
>>>the link by
>>> <A HREF="/index.htm">Go Home</A>
>>>
>>>The same sort of thinking applies for any files that are imported or
>>>referenced from ND, including graphics, etc. Since ND applications are
>>>executed via a CGI call, the 'inc' directory would have to be under your CGI
>>>(or scripts) directory. However, if you changed the SRC to be
>>>"/inc/javascript.js", the absolute path to the 'inc' directory would be
>>>(using the example above) C:\inetpub\wwwroot\inc.
>>>
>>>>1) how do you include js files in a netdynamics project?
>>>> I don't think you can just reference the file like:
>>>>
>>>><SCRIPT LANGUAGE="JavaScript" SRC="inc/javascript.js">
>>>></SCRIPT>
>>>>
>>>>.. because it doesn't seem to be able to find the file, even
>>>>though it is located in the inc directory and the file name is
>>>>correct.
>>>>
>>>>2) How do you include Stylesheet files in a NetDynamics project?
>>>>
>>>><LINK REL=STYLESHEET TYPE="text/css" HREF="inc/Css.htm">
>>>>
>>>>This will not work for me.
>>>>
>>>>3) Can you just include <script> ... </script> in the html of a
>>>>Netdynamics page?
>>>
>>>
>>>Just modify the HTML template for the ND page from the ND project directory.
>>>Just be VERY careful not to hit the 'Regenerate HTML' button because you
>>>will lose your changes.
>>>
>>>You can also customize the default HTML for the top and bottom of HTML pages
>>>from the HTML options. But be careful to strip any extra stuff out of any
>>>pages which don't require it.
>>>
>>>
>>>>4) Is there an easy way to include html files in a netdynamics
>>>>page. i.e. a header.htm and footer.htm file that should be placed
>>>>on everypage that has this include specified. I know there is a
>>>>SPIDERINCLUDE but it doesn't seem t have the proper effect, and I am
>>>>having trouble implimenting it.
>>>
>>>The SPIDERINCLUDE is one of the many under-documented features of ND. I
>>>haven't tried using it in ND 4.0... just in ND 3.1x. I found the following
>>>in the ND 4.1.2 docs:
>>>
>>>"This tag marks a spot in the HTML template where a file named
>>>includeFileName will be inserted. This can be useful to insert a common HTML
>>>header and/or footer or any shared HTML. Please note that the
>>>includeFileName must be a fully qualified path on the disk of the running
>>>Java CP or a path relative to the $NETDYN_HOME environment variable. It has
>>>nothing to do with the Web Server's documents directory."
>>>
>>>The thing that makes this confusing is that there is no $NETDYN_HOME
>>>environment variable in ND 4.1! In ND 3.x, this was the directory into
>>>which ND was installed. However, without that environment variable, I can
>>>see that there could be some problems.
>>>
>>>In addition, I seem to remember something about the SPIDERINCLUDE being
>>>processed once when the page is first loaded into the VM and not after. I
>>>could be wrong, but if this is the case and you are not clearing the cache
>>>before moving the headers and footers to a different directory, you won't
>>>see any effect from having moved them.
>>>
>>>If you haven't tried it, I would try putting the headers and footers in a
>>>the directory which contains the ND program directory. Also, turn on
>>>logging for the CP service to see if any exceptions occur from having not
>>>located the file.
>>>
>>>Good luck!
>>>
>>>-- Grace
>>>
>>>
>>
>
_________________________________________________________________________
For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html
For dire need help, email: [EMAIL PROTECTED]