OT Any HTML gurus ?



R

Richard Bates

Guest
Not totally off topic:

For my next tour i want to be able to publish a webpage
which will satisfy a couple of requirements.

1) I want it refer to data (directly on the same page: not
as a link) from an externall html page.

More specifically I want the following structure:

my own text

imported text+jpgs from external page whose URL will
change daily

more of my own text

2nd imported page, again changing daily

more of my own text

I would prefer something that doesn't require frames since
the rest of my site does not use them. (I'm not very clever
with html and am cheating by using net-objects-fusion). When
I do my daily webpage update en-route I will have access to
only a text editor, so the simpler the better.

Is there a command such as INSERT or REFER or something
along those lines?

2) Is there such a thing as a for-next loop in html?
Something along the lines of:

for n=1 to 100 display an image next n

Thanks for any help.

Love and html from Rich x

--
DISCLAIMER: My email box is private property.Email which
appears in my inbox is mine to do what I like with. Anything
which is sent to me (whether intended or not) may, if I so
desire, form a legal and binding contract.
 
On 17/3/04 12:43 pm, in article [email protected],
"Richard Bates" <[email protected]> wrote:

> Not totally off topic:
>
> For my next tour i want to be able to publish a webpage
> which will satisfy a couple of requirements.
>
> 1) I want it refer to data (directly on the same page: not
> as a link) from an externall html page.
>
> More specifically I want the following structure:
>
> my own text
>
> imported text+jpgs from external page whose URL will
> change daily
>
> more of my own text
>
> 2nd imported page, again changing daily
>
> more of my own text
>

The standard thing for this would be Server side Includes
but I presume that will be beyond your capabilities.

> I would prefer something that doesn't require frames
> since the rest of my site does not use them. (I'm not
> very clever with html and am cheating by using net-objects-
> fusion). When I do my daily webpage update en-route I
> will have access to only a text editor, so the simpler
> the better.
>
> Is there a command such as INSERT or REFER or something
> along those lines?

Not exactly without using a scripting language.

>
> 2) Is there such a thing as a for-next loop in html?
> Something along the lines of:
>
> for n=1 to 100 display an image next n

yes, in javascript.

You could source a javascript file that contains an array of
images (as URIs) and text descriptions which the client will
then display.

Something like (this will not run as it is more pseudo code)

(in the header)

<Link src=myscript.js>

(in the body>

<script lang=ecmascript> <!-- document.write(pagebody)
--> </script>

(in the file myscript.js)
---
images = new Array() descriptions=new Array() imagecount= 23

images[1] = "myimage1.jpg"; descriptions[1]="This is me by
the signpost"

...

images[23] = "myimage23.jpg" descriptions[23] = "Here I am
just up the hill from the signpost"

pagebody="<table>"

for i = 1 to imagecount do

pagebody=pagebody + "<tr><td><img src="+images \
+"></td><td>"+descriptions+"</td></tr>"

done

pagebody = pagebody + "</table>"

---

Then all you need to do is upload the photo, add the
filename in the images array, add a description in the
descriptions array and increase the imagecount.

..d

>
> Thanks for any help.
>
> Love and html from Rich x
 
Richard Bates <[email protected]> writes:

>Not totally off topic:

>For my next tour i want to be able to publish a webpage
>which will satisfy a couple of requirements.

>1) I want it refer to data (directly on the same page: not
> as a link) from an externall html page.

>More specifically I want the following structure:

> my own text

> imported text+jpgs from external page whose URL will
> change daily

> more of my own text

> 2nd imported page, again changing daily

> more of my own text

>I would prefer something that doesn't require frames since
>the rest of my site does not use them. (I'm not very clever
>with html and am cheating by using net-objects-fusion).
>When I do my daily webpage update en-route I will have
>access to only a text editor, so the simpler the better.

>Is there a command such as INSERT or REFER or something
>along those lines?

You can do this sort of thing very simply and directly in
shtml pages using the <!-include file= command, *but* the
inserted page has to be in the same directory as the main
page. The inserted page is simply plain html which behaves
as though it was seamlessly part of the original.

>2) Is there such a thing as a for-next loop in html?
> Something along the lines of:

> for n=1 to 100 display an image next n

The easiest way to get this effect is to use a multiple-
image gif image file, such as is commonly used to display
rotating buttons and the like.

--
Chris Malcolm [email protected] +44 (0)131 651 3445 DoD #205
IPAB, Informatics, JCMB, King's Buildings, Edinburgh, EH9 3JZ, UK
[http://www.dai.ed.ac.uk/homes/cam/]
 
in message <[email protected]>, Richard Bates
('[email protected]') wrote:

> Not totally off topic:
>
> For my next tour i want to be able to publish a webpage
> which will satisfy a couple of requirements.
>
> 1) I want it refer to data (directly on the same page: not
> as a link) from an externall html page.
>
> More specifically I want the following structure:
>
> my own text
>
> imported text+jpgs from external page whose URL will
> change daily
>
> more of my own text
>
> 2nd imported page, again changing daily
>
> more of my own text
>
> I would prefer something that doesn't require frames
> since the rest of my site does not use them. (I'm not
> very clever with html and am cheating by using net-objects-
> fusion). When I do my daily webpage update en-route I
> will have access to only a text editor, so the simpler
> the better.
>
> Is there a command such as INSERT or REFER or something
> along those lines?

Not in HTML itself, no. This could be done with some
fairly hairy XSL-T (which does have this sort of
feature), but if you set it up to run the XSL-T client
side it would only work with recent browsers, and whether
your ISP has the facilities to do XSL-T server side is
another question entirely.

> 2) Is there such a thing as a for-next loop in html?
> Something along the lines of:

HTML is not a programming language, it's a mark-up language.
There are no control constructs in HTML.

Another possiility would be to use a server-side scripting
language such as PHP, although this could not easily do the
trick of pulling bits out of other pages (it's possible but
not easy).

--
[email protected] (Simon Brooke)
http://www.jasmine.org.uk/~simon/

Anagram: I'm soon broke.