Development JS version of PHP include/require

Discussion in 'Software' started by 731|\|37, 8 Nov 2005.

  1. 731|\|37

    731|\|37 ESD Engineer in Training

    Joined:
    5 Sep 2004
    Posts:
    1,047
    Likes Received:
    0
    so before this piece of crap gets finalized as boy scout troop 360's official web page I need to do something. It was origionaly written with a WYSIWYG... all internal CSS... cream/puke colored background. No background image transparencies, and no layout whatsoever....


    so after witnessing this fiasco I want to throw something together. My problem is that frames suck. But I want the functionality. Hence PHP include/require something. However I would realy like it to be JS or something along those lines because of server-side support/lack-thereof and because I can demo it offline. Is there a JS method that would acomplish what I need?

    looking for a quick response. im almost done with the sketchup before I start working.

    thanks
     
  2. Atomic

    Atomic Gerwaff

    Joined:
    6 May 2002
    Posts:
    9,646
    Likes Received:
    94
    Have a look at server side includes if you dont want to use php.

    JS is a bit of a clumsy way of doing it.

    http://httpd.apache.org/docs/1.3/howto/ssi.html
     
  3. SJH

    SJH Minimodder

    Joined:
    24 Dec 2003
    Posts:
    1,427
    Likes Received:
    5
    I suppose you could use <script src="anotherfile.js" type="text/javascript"></script> and use document.write() in anotherfile.js to output the content, but that's a nightmare for accessibility and search engine visibility, so please do not do it :)
     
  4. Atomic

    Atomic Gerwaff

    Joined:
    6 May 2002
    Posts:
    9,646
    Likes Received:
    94
    jusy use SSI - any decent webhost will have them enabled and they are easy asy pie to use.
     
  5. 731|\|37

    731|\|37 ESD Engineer in Training

    Joined:
    5 Sep 2004
    Posts:
    1,047
    Likes Received:
    0
    im reluctant to becaue I need it to function offline too. I might have found what I want though
     
  6. TekMonkey

    TekMonkey I enjoy cheese.

    Joined:
    6 Dec 2002
    Posts:
    3,081
    Likes Received:
    0
    err...install php on your pc? then you can test it offline :p.
     
  7. Atomic

    Atomic Gerwaff

    Joined:
    6 May 2002
    Posts:
    9,646
    Likes Received:
    94
    Then just run a local apache server. sorted.
     
  8. 731|\|37

    731|\|37 ESD Engineer in Training

    Joined:
    5 Sep 2004
    Posts:
    1,047
    Likes Received:
    0
    portable viewing... come on guys I know what I need :~/
     
  9. RTT

    RTT #parp

    Joined:
    12 Mar 2001
    Posts:
    14,120
    Likes Received:
    74
    Well you've rejected everything so far apart from use of JS to document.write out <script> tags, so looks like that is your only bet :)
     
  10. Atomic

    Atomic Gerwaff

    Joined:
    6 May 2002
    Posts:
    9,646
    Likes Received:
    94
    We'll I'll warn you now. What you want to do with JS is awful webpractice and will prob cause you more problems in the long run.
     
  11. 731|\|37

    731|\|37 ESD Engineer in Training

    Joined:
    5 Sep 2004
    Posts:
    1,047
    Likes Received:
    0
     

Share This Page