Loading ...
Sorry, an error occurred while loading the content.
 

Re: [NH] Re: Newbie HTML question

Expand Messages
  • Alec Burgess
    Hi Jorma I have a feeling this is going to prove embarrassing .... Jorma Easiest done with server side includes (SSI) - Google helps What s a server?.... (see
    Message 1 of 4 , Oct 2, 2001
      Hi Jorma
      I have a feeling this is going to prove embarrassing ....

      Jorma> Easiest done with server side includes (SSI) - Google helps
      What's a server?.... (see what I mean)

      In my first cut, I'm trying to do this all on my on HDD with out actually
      putting anything on an external web-site.

      Very briefly: (I'll try!)
      I've created an HTML document that has one table, with four cells (2 rows x
      2 columns). In another folder, I have four text files - initially they were
      just text with blank lines separating paragraphs.

      I used Notetab FIND-REPLACE to change all occurrences of "^p^p" to "</p><p>"

      I verified that with <cut> and <paste> I could drop the contents of each
      file in the appropriate cell of the table and it would all display correctly
      in a browser.

      Just to make sure: I want to put some code in the master document that will
      cause the "browser" to get the current contents of the four files and
      display them in the four cells.

      Per your suggestion I searched Google for "server side includes" lots of
      hits but I'm not sure where to start. ... Do I require extra software to do
      the next step?

      Jorma>Kludgy approach is to insert JavaScript with "src" attribute and use
      document.write to include missing bits.

      Should I be trying to find a tutorial on "Java Scripting"?

      Regards Alec
      ----- Original Message -----
      From: <tenu@...>
      To: <ntb-html@yahoogroups.com>
      Sent: 02 October, 2001 01:36
      Subject: [NH] Re: Newbie HTML question
    • tenu@sci.fi
      ... Hopefully educating, not embarrassing. ... Server is the machine *serving* pages to clients , usually browsers. It s the computer of your web-site
      Message 2 of 4 , Oct 2, 2001
        --- In ntb-html@y..., "Alec Burgess" <burale@a...> wrote:

        > I have a feeling this is going to prove embarrassing ....

        Hopefully educating, not embarrassing.

        > Jorma> Easiest done with server side includes (SSI) - Google helps
        > What's a server?.... (see what I mean)

        "Server" is the machine *serving* pages to "clients", usually
        browsers.
        It's the computer of your web-site provider.

        > In my first cut, I'm trying to do this all on my on HDD with out
        actually
        > putting anything on an external web-site.

        If you can, first try with web-site - that's a lot easier way:
        put file called "test.shtml" (note the extension, it tells the
        server it needs to do extra work) on your site, contents of
        the file below:

        -------- cut here ------------
        <html><head><title>SSI test</title></head><body>
        If there's text below this line then SSI works
        <p>
        <!--#include file="data.html" -->
        </body></html>
        -------- cut here ------------

        and put file called "data.html" on your site too,
        it's contents being whatever you want.



        If you really REALLY *REALLY* want to use JavaScript
        then this might help:

        test.html:
        -------- cut here ------------
        <html><head><title>External table cells</title>
        <script src="data.js"></script>
        </head><body>

        <table border=1>
        <tr><td>
        <script language="javascript"><!--
        document.write(cell1)
        // --></script>
        </td><td>
        <script language="javascript"><!--
        document.write(cell2)
        // --></script>
        </td></tr>

        <tr><td>
        <script language="javascript"><!--
        document.write(cell3)
        // --></script>
        </td><td>
        <script language="javascript"><!--
        document.write(cell4)
        // --></script>
        </td></tr>

        </table>
        <noscript>
        I'm sorry, this poorly coded page doesn't work without JavaScript.
        <noscript>
        </body>
        </html>
        -------- cut here ------------

        data.js
        -------- cut here ------------
        var cell1 = 'data in cell 1'
        var cell2 = 'data in cell 2'
        var cell3 = 'data in cell 3'
        var cell4 = 'data in '
        cell4 += 'cell 4'
        -------- cut here ------------

        cell4 above is made differently to show how to join together longer
        lines.

        Using JavaScript leaves cells empty if you have disabled JavaScript,
        that's why you shouldn't use it.

        HTML4 deprecated "languge" attribute, so you need to use
        <script type="text/javascript"> if you want to write HTML 4 code.


        I hope this helps.

        Jorma
      • Alec Burgess
        Jorma, Robert - Thank you both for your responses: I m beginning to see a light at the end of the tunnel ;--) Regards ... Alec ... From: To:
        Message 3 of 4 , Oct 2, 2001
          Jorma, Robert - Thank you both for your responses: I'm beginning to see a
          light at the end of the tunnel ;--) Regards ... Alec
          ----- Original Message -----
          From: <tenu@...>
          To: <ntb-html@yahoogroups.com>
          Sent: 02 October, 2001 12:46
          Subject: [NH] Re: Newbie HTML question

          and

          ----- Original Message -----
          From: "Robert Newsome" <bob@...>
          To: <ntb-html@yahoogroups.com>
          Sent: 02 October, 2001 07:53
          Subject: [NH] Re: Newbie HTML question
        • tenu@sci.fi
          ... Oops, use this: I m sorry... Jorma
          Message 4 of 4 , Oct 2, 2001
            --- In ntb-html@y..., tenu@s... wrote:
            > <noscript>
            > I'm sorry, this poorly coded page doesn't work without JavaScript.
            > <noscript>

            Oops, use this:

            <noscript>
            I'm sorry...
            </noscript>


            Jorma
          Your message has been successfully submitted and would be delivered to recipients shortly.