The website at was uniquely crafted by hand, without the use of platforms like Wordpress or any PHP-type databases.
Upon its creation over 15 years ago, a legal notice was not initially included on the website. Now, there is a desire to add a link to a legal notice in the footer of each webpage. This legal notice could be located on a separate webpage in the root directory named "legalnotice.html".
The goal is to integrate this legal notice without altering the existing footers of all webpages.
Within the footer of each webpage, there is a mail link structure as shown below:
<quote>
<!-- Infobas -->
<div class="infobas">
<table summary="Bottom footer" width="100%" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td class="bas">
<script type="text/javascript" src="scripts/contactez_nous.txt">
</script><br>
</td>
</tr>
</tbody>
</table>
</div>
<!-- /Infobas-->
</quote>
In order to point to the "scripts" root directory from a first level sub-directory, the structure would include "../" as follows:
<quote>
<!-- Infobas -->
<div class="infobas">
<table summary="Bottom footer" width="100%" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td class="bas">
<script type="text/javascript" src="../scripts/contactez_nous.txt">
</script><br>
</td>
</tr>
</tbody>
</table>
</div>
<!-- /Infobas -->
</quote>
The script containing email contact information is stored within the script folder located at the root, structured as below (with confidential segments hidden):
<quote>
/* "Contactez nous"
Creates a message with the bee's email address
and text in the subject field
*/
// Initializing a variable containing the beginning of the HTML code
var contactlink="<a href='mailto:";
/* Adding various elements of the email address
to the variable
*/
contactlink +="xxx";
contactlink +="@";
contactlink +="yyy.fr";
contactlink +="?subject=%5BAbeille%5D%20Demande%20d%27information'>";
// Displaying the variable along with the term "contact us"
document.write(contactlink+"Contact us @<\/a>");
</quote>
This script, adapted for different levels of sub-directories within the website's structure, exists on every page of the site, providing seamless functionality.
The intention is to create and upload a legalnotice.html page while modifying the script, without requiring alterations to all footer content across the website to accommodate changes in hierarchy for linking to legal notices.
An approach leveraging relative links to the legal notice page would necessitate adjustments to every footer, which isn't ideal. Similarly, using an absolute link poses the risk of becoming obsolete if the website address changes.
Is there a solution that allows for achieving these objectives: (1) avoiding extensive modifications to all footers and (2) ensuring independence from changes in website addresses?
Any suggestions are greatly appreciated. Thank you in advance.