Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

But maybe we don't really need that... -- Larry Wall in <199709011851.LAA07101@wall.org>


devel / alt.html / Re: How to "include" menus on every html page?

SubjectAuthor
* How to "include" menus on every html page?C Bacca
+- Re: How to "include" menus on every html page?Dale
`* Re: How to "include" menus on every html page?JJ
 `* Re: How to "include" menus on every html page?Lewis
  +- Re: How to "include" menus on every html page?Lewis
  `- Re: How to "include" menus on every html page?Jukka K. Korpela

1
How to "include" menus on every html page?

<b258ec51-81c2-4b05-afd8-eb370daacde6n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=543&group=alt.html#543

  copy link   Newsgroups: alt.html
X-Received: by 2002:ac8:5a89:0:b0:2f3:5ab1:3e4f with SMTP id c9-20020ac85a89000000b002f35ab13e4fmr5134660qtc.528.1650728679824;
Sat, 23 Apr 2022 08:44:39 -0700 (PDT)
X-Received: by 2002:a05:622a:58f:b0:2f2:58:578a with SMTP id
c15-20020a05622a058f00b002f20058578amr6845384qtb.180.1650728679683; Sat, 23
Apr 2022 08:44:39 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: alt.html
Date: Sat, 23 Apr 2022 08:44:39 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:ee30:cb80:2425:9ec2:db8d:b535;
posting-account=xjgCxgoAAADzXGM-mePEg_j-ii5da0PN
NNTP-Posting-Host: 2600:1700:ee30:cb80:2425:9ec2:db8d:b535
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b258ec51-81c2-4b05-afd8-eb370daacde6n@googlegroups.com>
Subject: How to "include" menus on every html page?
From: bacca...@protonmail.com (C Bacca)
Injection-Date: Sat, 23 Apr 2022 15:44:39 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 28
 by: C Bacca - Sat, 23 Apr 2022 15:44 UTC

Hi,
I'm making a website for an organization. We rent space from a website host..

- They would like the same standard drop down menu in HTML on every page.
- The host's website builder is buggy so we can no longer use that, we will be using manual HTML which I will write with a text editor. I have experience doing this.
- My work space where I make the HTML files is Windows 11. I will be making the HTML files on my PC and then it's simple to upload them to the host. I will also be using a global CSS file.
- I do not have shell access to the hosting website. Access is through Cpanel.

I know how to make a standard dropdown multi-level menu in HTML. I already have that part working. What I don't know how to do is make the menu once, and include it at the top of every HTML file, (just after the "body" tag) like a programmer includes files.

Is there a way to do this easily? Or will I have to make a .bat file that does this somehow and "build" all files with different html headers, but the same menu, followed by different text for the body, then a possible standard footer.

Since I've always done HTML with a text editor I'm not away of any tools where I can manage the HTML files on my PC.

Thank you!

Re: How to "include" menus on every html page?

<t42751$1ms$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=544&group=alt.html#544

  copy link   Newsgroups: alt.html
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: dal...@dalekelly.org (Dale)
Newsgroups: alt.html
Subject: Re: How to "include" menus on every html page?
Date: Sat, 23 Apr 2022 20:54:56 -0400
Organization: https://www.dalekelly.org/
Lines: 11
Message-ID: <t42751$1ms$1@dont-email.me>
References: <b258ec51-81c2-4b05-afd8-eb370daacde6n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 24 Apr 2022 00:54:57 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="58b502241a326d7fdd785dd3f51be9e9";
logging-data="1756"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18mY58gVpNggLY9omLe1zMz1ljC1omocz8="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.8.1
Cancel-Lock: sha1:oZenOXS2eAklLQQe9zozjsJSR7A=
In-Reply-To: <b258ec51-81c2-4b05-afd8-eb370daacde6n@googlegroups.com>
Content-Language: en-US
 by: Dale - Sun, 24 Apr 2022 00:54 UTC

On 4/23/2022 11:44 AM, C Bacca wrote:
> using a global CSS file

I'm kinda interested in a single site-wide menu too

in my CSS file?

no scripts or cookies, etc.

--
Mystery? -> https://www.dalekelly.org/

Re: How to "include" menus on every html page?

<amlj3k4y7t2k.ml0kjy6dglf5.dlg@40tude.net>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=545&group=alt.html#545

  copy link   Newsgroups: alt.html
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: jj4pub...@gmail.com (JJ)
Newsgroups: alt.html
Subject: Re: How to "include" menus on every html page?
Date: Mon, 25 Apr 2022 02:08:00 +0700
Organization: A noiseless patient Spider
Lines: 52
Message-ID: <amlj3k4y7t2k.ml0kjy6dglf5.dlg@40tude.net>
References: <b258ec51-81c2-4b05-afd8-eb370daacde6n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Injection-Info: reader02.eternal-september.org; posting-host="834869ff903972fab12a7705fb26d5c9";
logging-data="32075"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18TJzbAnNm+stVXHnqfrnPuqj3ffJS5BS8="
User-Agent: 40tude_Dialog/2.0.15.84
Cancel-Lock: sha1:1kWdP1yZyD9GqiUfMWr0rvn/nrE=
X-Bitcoin: 1LcqwCQBQmhcWfWsVEAeyLchkAY8ZfuMnS
X-Face: \*\`0(1j~VfYC>ebz[&O.]=,Nm\oRM{of,liRO#7Eqi4|!]!(Gs=Akgh{J)605>C9Air?pa d{sSZ09u+A7f<^paR"/NH_#<mE1S"hde\c6PZLUB[t/s5-+Iu5DSc?P0+4%,Hl
 by: JJ - Sun, 24 Apr 2022 19:08 UTC

On Sat, 23 Apr 2022 08:44:39 -0700 (PDT), C Bacca wrote:
> Hi,
> I'm making a website for an organization. We rent space from a website host..
>
> - They would like the same standard drop down menu in HTML on every page.
> - The host's website builder is buggy so we can no longer use that, we will be using manual HTML which I will write with a text editor. I have experience doing this.
> - My work space where I make the HTML files is Windows 11. I will be making the HTML files on my PC and then it's simple to upload them to the host. I will also be using a global CSS file.
> - I do not have shell access to the hosting website. Access is through Cpanel.
>
> I know how to make a standard dropdown multi-level menu in HTML. I already have that part working. What I don't know how to do is make the menu once, and include it at the top of every HTML file, (just after the "body" tag) like a programmer includes files.
>
> Is there a way to do this easily? Or will I have to make a .bat file that does this somehow and "build" all files with different html headers, but the same menu, followed by different text for the body, then a possible standard footer.
>
> Since I've always done HTML with a text editor I'm not away of any tools where I can manage the HTML files on my PC.
>
> Thank you!

If it's for simple menu which is not a pull down menu, it can be done with
pure HTML, using IFRAME.

In your case, the menu is placed in a separate HTML which contains nothing
but the menu where all menu links has a `target` attribute which is set to
`_top` or `_parent`.

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-target

All the HTML pages which shows the menu would have an IFRAME to show the
menu. e.g.

<iframe "menu.html"></iframe>

The IFRAME should be styled to fit the whole area of the menu.

For pull down menus, JavaScript (JS) would be needed to retrieve the
separate menu HTML and insert it into the current page (JS is not required
for the menu pulldown mechanism). In this case, the menu HTML should contain
only the content - without HTML, HEAD, and BODY tags.

For all HTML pages which need to show the menu, it should have a container
tag for the menu. e.g.

<div id="menu"></div>

Then have a JS script to load the menu HTML resource and place it into that
container. e.g.

<script>
(async () => menu.innerHTML = await (await fetch("menu")).text())()
</script>

Note: the SCRIPT tag should be placed _after_ the `menu` DIV tag within the
HTML.

Re: How to "include" menus on every html page?

<slrnt6bg89.v8u.g.kreme@zephyrus.local>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=546&group=alt.html#546

  copy link   Newsgroups: alt.html
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!kreme.dont-email.me!.POSTED!not-for-mail
From: g.kr...@kreme.dont-email.me (Lewis)
Newsgroups: alt.html
Subject: Re: How to "include" menus on every html page?
Date: Sun, 24 Apr 2022 21:28:41 -0000 (UTC)
Organization: Miskatonic U
Lines: 12
Message-ID: <slrnt6bg89.v8u.g.kreme@zephyrus.local>
References: <b258ec51-81c2-4b05-afd8-eb370daacde6n@googlegroups.com>
<amlj3k4y7t2k.ml0kjy6dglf5.dlg@40tude.net>
Reply-To: g.kreme@gmail.don-t-email-me.com
Injection-Date: Sun, 24 Apr 2022 21:28:41 -0000 (UTC)
Injection-Info: kreme.dont-email.me; posting-host="9d518ac2a6f2754a1ec424c3f1803e06";
logging-data="23918"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+LM8CwcCynvnDYDXDx/IVs"
User-Agent: slrn/1.0.3 (Darwin)
Cancel-Lock: sha1:i5UuTF4wHdmgPtTXcc4jI4kvlc8=
X-Face: )^b5"R:T7U>9~:PEn3YkzMfW*[b1qKeU.fP9C8~8HpU9}lA&6`bH1z
X-Clacks-Overhead: GNU Terry Pratchett
Mail-Copies-To: nobody
 by: Lewis - Sun, 24 Apr 2022 21:28 UTC

In message <amlj3k4y7t2k.ml0kjy6dglf5.dlg@40tude.net> JJ <jj4public@gmail.com> wrote:
> For pull down menus, JavaScript (JS) would be needed to retrieve the
> separate menu HTML and insert it into the current page (JS is not required
> for the menu pulldown mechanism). In this case, the menu HTML should contain
> only the content - without HTML, HEAD, and BODY tags.

I'm pretty sure you cn do this without JavaScript. It is certainly
possible to make drop-down menus using only HTML and CSS and I can't
think of any reason using an iframe would change that.

--
Strange things are afoot at the Circle K

Re: How to "include" menus on every html page?

<slrnt6bggt.v8u.g.kreme@zephyrus.local>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=547&group=alt.html#547

  copy link   Newsgroups: alt.html
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!kreme.dont-email.me!.POSTED!not-for-mail
From: g.kr...@kreme.dont-email.me (Lewis)
Newsgroups: alt.html
Subject: Re: How to "include" menus on every html page?
Date: Sun, 24 Apr 2022 21:33:17 -0000 (UTC)
Organization: Miskatonic U
Lines: 20
Message-ID: <slrnt6bggt.v8u.g.kreme@zephyrus.local>
References: <b258ec51-81c2-4b05-afd8-eb370daacde6n@googlegroups.com>
<amlj3k4y7t2k.ml0kjy6dglf5.dlg@40tude.net>
<slrnt6bg89.v8u.g.kreme@zephyrus.local>
Reply-To: g.kreme@gmail.don-t-email-me.com
Injection-Date: Sun, 24 Apr 2022 21:33:17 -0000 (UTC)
Injection-Info: kreme.dont-email.me; posting-host="9d518ac2a6f2754a1ec424c3f1803e06";
logging-data="23918"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+kEWArZVSjfV+VqQ59URaJ"
User-Agent: slrn/1.0.3 (Darwin)
Cancel-Lock: sha1:QHdQn8PwxkeB5NOqULuLSI+ZhUc=
X-Face: )^b5"R:T7U>9~:PEn3YkzMfW*[b1qKeU.fP9C8~8HpU9}lA&6`bH1z
X-Clacks-Overhead: GNU Terry Pratchett
Mail-Copies-To: nobody
 by: Lewis - Sun, 24 Apr 2022 21:33 UTC

In message <slrnt6bg89.v8u.g.kreme@zephyrus.local> Lewis <g.kreme@kreme.dont-email.me> wrote:
> In message <amlj3k4y7t2k.ml0kjy6dglf5.dlg@40tude.net> JJ <jj4public@gmail.com> wrote:
>> For pull down menus, JavaScript (JS) would be needed to retrieve the
>> separate menu HTML and insert it into the current page (JS is not required
>> for the menu pulldown mechanism). In this case, the menu HTML should contain
>> only the content - without HTML, HEAD, and BODY tags.

> I'm pretty sure you cn do this without JavaScript. It is certainly
> possible to make drop-down menus using only HTML and CSS and I can't
> think of any reason using an iframe would change that.

Meant to add:

However, this is simple to do in JavaScript and JavaScript is the best
and right way to do this, and much MUCH easier to write, maintain, and
manage. Dropdowns with CSS are certainly possible, but they are ...
hairy.

--
in the long run there's still time to change the road you're on

Re: How to "include" menus on every html page?

<t45vkr$l7l$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=548&group=alt.html#548

  copy link   Newsgroups: alt.html
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: jukk...@gmail.com (Jukka K. Korpela)
Newsgroups: alt.html
Subject: Re: How to "include" menus on every html page?
Date: Mon, 25 Apr 2022 14:11:21 +0300
Organization: A noiseless patient Spider
Lines: 32
Message-ID: <t45vkr$l7l$1@dont-email.me>
References: <b258ec51-81c2-4b05-afd8-eb370daacde6n@googlegroups.com>
<amlj3k4y7t2k.ml0kjy6dglf5.dlg@40tude.net>
<slrnt6bg89.v8u.g.kreme@zephyrus.local>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 25 Apr 2022 11:11:23 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="59f5f89efe23713214f161c63405deba";
logging-data="21749"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/+2kfODq+UNjUfkEOTEO2X"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.8.0
Cancel-Lock: sha1:Qc8RL0bv9FCHG/kVb2FYHXFWFYg=
In-Reply-To: <slrnt6bg89.v8u.g.kreme@zephyrus.local>
 by: Jukka K. Korpela - Mon, 25 Apr 2022 11:11 UTC

Lewis wrote:

> In message <amlj3k4y7t2k.ml0kjy6dglf5.dlg@40tude.net> JJ <jj4public@gmail.com> wrote:
>> For pull down menus, JavaScript (JS) would be needed to retrieve the
>> separate menu HTML and insert it into the current page (JS is not required
>> for the menu pulldown mechanism). In this case, the menu HTML should contain
>> only the content - without HTML, HEAD, and BODY tags.
>
> I'm pretty sure you cn do this without JavaScript. It is certainly
> possible to make drop-down menus using only HTML and CSS and I can't
> think of any reason using an iframe would change that.

You can of course create a dropdown menu in plain HTML, using the
<select> element, and you can make it nested in a sense by using
<optgroup> elements. But a <select> element is just a form field where
the user can select one (or maybe more) of a given set of values. No
functionality; specifically, no linking to another page or place.

Using different HTML elements you can create a set of elements that
appear as vertical list by default, but with some relatively complicated
CSS you can make it behave, in a user interface, as a dropdown list
(possibly nested). Still, this does not add functionality. If the basic
building blocks of the construct are <a href=...> elements, they’ll work
as links, but only when clicked on (or whatever the link activation
method is in each user agent).

So I think it really boils down to the necessity of some JavaScript
code. But it can be really simple and can be written inside the iframed
HTML document. You could have just one onchange=... attribute for a
<select> element so that selecting an options works much the same way as
following a normal link.

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor