SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Enthusiast oneafrikan's Avatar
    Join Date
    Oct 1999
    Location
    London, Uk
    Posts
    78
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    javascript includes??

    Hi there

    I wonder if it's possible to combine server side includes in javascript?

    using a normal ssi in a shtml file is fine:
    <!--#include virtual='include.htm'"-->

    but I'm having a problem including such a file into a js function.Basically the function specifies a few things, and the content i need/am using is specified in the script itself - so using the <!-- isn't working...

    Anyway - I'm wondering...., anybody got any ideas??

    Thanks and regards in advance
    /timber
    -> www.oneafrikan.com ><-><><-><-><-><-><
    -> www.openboxsoftware.com ><><-><-><-><

  2. #2
    Xbox why have you forsaken me? moospot's Avatar
    Join Date
    Feb 2001
    Location
    Clearwater, FL
    Posts
    3,615
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use an external reference:

    <SCRIPT LANGUAGE="JavaScript" SRC="script.js"></SCRIPT>

    It works in much the same way.

  3. #3
    SitePoint Enthusiast oneafrikan's Avatar
    Join Date
    Oct 1999
    Location
    London, Uk
    Posts
    78
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    thanks but not finished

    Hi there

    Thanks for your reply! ;-)

    Can you nest the script?
    ie
    <script>
    blather
    <script>
    include file here for example...
    </script>
    </script>

    Thanks again..
    /timber
    -> www.oneafrikan.com ><-><><-><-><-><-><
    -> www.openboxsoftware.com ><><-><-><-><


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •