Author Topic: HTML topics  (Read 7007 times)

Offline stonechat

  • RootsChat Aristocrat
  • ******
  • Posts: 2,682
    • View Profile
Re: HTML topics
« Reply #18 on: Tuesday 02 May 06 16:47 BST (UK) »
To be hones I am thankful I am using Frontapge, I will look at html very opccasionally but I don't want to

Am i just perverse?
Douglas, Varnden, Joy(i)ce Surrey, Clarke Northants/Hunts, Pullen Worcs/Herefords, Holmes Birmingham/USA/Canada/Australia, Jackson Cheshire/Yorkshire, Lomas Cheshire, Lee Yorkshire, Cocks Lancashire, Leah Cheshire, Cook Yorkshire, Catlow Lancashire
See my website http://www.cotswan.com

Offline Malcolm Bull

  • RootsChat Veteran
  • *****
  • Posts: 912
    • View Profile
Re: HTML topics
« Reply #19 on: Wednesday 03 May 06 09:05 BST (UK) »
Why do you think that you're perverse?  It makes sense to use the simplest tools if you're doing regular work and just creating pages of text.  However, I'm creating and maintaining over 1100 linked pages from text produced from a non-Windows/non-Miscrosoft database on another computer system, so FrontPage doesn't fit in at all and doesn't offer the flexibility that I need.

Malcolm Bull
Surname interests:

Huntingdon: Bull / Shelford
Rotherham: Andrews / Steel
Easingwold: Snowball / Potter

Offline Berlin-Bob

  • RootsChat Honorary
  • RootsChat Marquessate
  • *******
  • Posts: 7,442
    • View Profile
Re: HTML topics
« Reply #20 on: Thursday 04 May 06 19:25 BST (UK) »
Hi Malcolm,

I just tried out your example, with one change in the main program::

Code: [Select]
<html>
<body>   
the cat sat on the mat aa a a a a a a a a a a a a a a      <br>
before                                                     <br>
===============================                            <br>
<? include "xxx.html" ?>         
===============================                            <br>
after                                                      <br>
the cat sat on the mat zz zz z z z z z z z zz z z z z z    <br>
</body>
</html>

and  without the html start and end tags in the xxx.html file
(even if you call the file xxx.php, the contents will always be interpreted as HTML unless you use the <? and ?> PHP tags.)

Code: [Select]
now is the time for all good men to come to the aid of the party a a a a a a <br>
this is the inserted document                                                <br>
now is the time for all good men to come to the aid of the party z z z z z z z <br>

the br-Tags are just line feeds, to format the text.

You need to load it to your website, as normal home computers don't have PHP, the RootsChat free webspace does  :) :)

You can see the results here:  http://tutorial.rootschat.net/test.php

Re-reading your reply to Stonechat:
with 1100 linked pages I am wondering whether it might be an idea for you to download a (free)  PHP environment like XAMPP, which gives you Apache, MySQL and PHP, so that you can test your pages offline first.

Bob
Any UK Census Data included in this post is Crown Copyright (see: www.nationalarchives.gov.uk)

Offline Malcolm Bull

  • RootsChat Veteran
  • *****
  • Posts: 912
    • View Profile
Re: HTML topics
« Reply #21 on: Friday 05 May 06 08:54 BST (UK) »
I'm getting to the "it must be me!" stage.

Your example displays fine [I'm using AOL], but when I upload my version to AOL it still misses out the included text.  Although AOL displays PHP pages on other websites OK.

I'll try your recommendation abut XAMPP

Thanks again for your help.

Malcolm Bull
Surname interests:

Huntingdon: Bull / Shelford
Rotherham: Andrews / Steel
Easingwold: Snowball / Potter


Offline Berlin-Bob

  • RootsChat Honorary
  • RootsChat Marquessate
  • *******
  • Posts: 7,442
    • View Profile
Re: HTML topics
« Reply #22 on: Friday 05 May 06 09:07 BST (UK) »
Just in case anybody else is interested in XAMPP:

http://www.apachefriends.org/en/index.html
Any UK Census Data included in this post is Crown Copyright (see: www.nationalarchives.gov.uk)

Offline Jon75

  • RootsChat Extra
  • **
  • Posts: 7
    • View Profile
Re: HTML topics
« Reply #23 on: Sunday 28 May 06 10:22 BST (UK) »
Hi Malcom,

Did you have any joy getting your code to work?

If not, I do believe I see whathe problem is. Please let me know if you need any further assistance.

Kind regards.

Offline Berlin-Bob

  • RootsChat Honorary
  • RootsChat Marquessate
  • *******
  • Posts: 7,442
    • View Profile
Re: HTML topics
« Reply #24 on: Sunday 28 May 06 10:28 BST (UK) »
Hi Jon75,

Welcome to RootsChat  :)


Don't keep us in suspense, why not tell us anyway ?

(even if Malcolm has solved his problem, it might help someone else)

Bob
Any UK Census Data included in this post is Crown Copyright (see: www.nationalarchives.gov.uk)

Offline downside

  • RootsChat Marquessate
  • *******
  • Posts: 4,208
  • Make my day
    • View Profile
Re: HTML topics
« Reply #25 on: Sunday 28 May 06 16:31 BST (UK) »
Hi

You can achieve this by using an XML data island.

Lets imagine your main document looks like this example below:

<html>
<body>
This is the main document.<p>

I need to insert the contents of a file here at this place in the document.  This is what an xml data island can do:<p>

<xml src="note.xml" id="xmldso" async="false"></xml>

<span datasrc="#xmldso" datafld="sometext"></span>


<p>The main document continues ..........<br>
</body>
</html>

Let's imagine you want to import the contents of a file called note.xml (which is just a plain text file with a .xml filename extension).  This is what it looks like:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<note>
<sometext>This is a file that contains
a
a
a
a
a
a
a
a
a
a few lines of text.</sometext>
</note>

So really all you have to do is add a couple of lines of code to your notes.xml file at the top and the bottom and you can effectively import the whole contents of that file into your main document.  You store the file contents between the <sometext> tags.  It looks like this:

This is the main document.
I need to insert the contents of a file here at this place in the document. This is what an xml data island can do:

This is a file that contains
a
a
a
a
a
a
a
a
a
a few lines of text.

The main document continues ..........

I hope I have understood your problem and provided a solution.

Regards

downside
Sussex: Floate, West
Kent: Tuffee
Cheshire: Gradwell
Lancashire: Gradwell

UK Census information is Crown Copyright, from www.nationalarchives.gov.uk

Offline Berlin-Bob

  • RootsChat Honorary
  • RootsChat Marquessate
  • *******
  • Posts: 7,442
    • View Profile
Re: HTML topics
« Reply #26 on: Sunday 28 May 06 20:57 BST (UK) »
Hi Downside,

I just tried out your example, using the same test file I used for the PHP suggestion:

test2.htm:
Code: [Select]
<html>
<body>   
the cat sat on the mat aa a a a a a a a a a a a a a a      <br>
before                                                     <br>
===============================                            <br>
<xml src="./testinc2.xml" id="xmldso" async="false"></xml>
<span datasrc="#xmldso" datafld="sometext"></span>
===============================                            <br>
after                                                      <br>
the cat sat on the mat zz zz z z z z z z z zz z z z z z    <br>
</body>
</html>

and  testinc2.xml:
Code: [Select]
<?xml version="1.0" encoding="ISO-8859-1" ?>
<testinc2>
<sometext>
now is the time for all good men to come to the aid of the party a a a a a a <br>
this is the inserted document                                                <br>
now is the time for all good men to come to the aid of the party z z z z z z z <br>
</sometext>
</testinc2>

I've uploaded it to http://tutorial.rootschat.net/test2.htm

Unfortunately, there is no sign of the "data island", neither in IE nor Firefox  :(
Any ideas why not - it seems simple enough and it would certainly solve some of my problems.

Bob
Any UK Census Data included in this post is Crown Copyright (see: www.nationalarchives.gov.uk)