I would like to make my dropdown menu updateable from a single file.
Let me explain: On my website I have a general menu, this menu is in a file called nav.html every time I add a new section to my website, I just have to go to this file nav.html and there I put my new section This prevents me from going to each tab of the web and putting the new section one by one . I want to do the same thing but with a dropdown menu that I have. If someone could tell me how to make this dropdown section updateable from a single file that would be great. It would be a single file where I would put each new section.
I put what I use now:
<SCRIPT LANGUAGE="JavaScript">
function salta(Sel)
{
if (Sel.ad.selectedIndex != 0)
{
document.location=Sel.ad.options[Sel.ad.selectedIndex].value
}
}
</SCRIPT>
<div>
<form>
<select name="ad" onchange="salta(this.form)">
<option selected>Artículos:
<option value=“articulo1.html”>ejemplo 1
<option value="articulo2.html”>Ejemplo 2
</select>
</form>
</div>
What I want is to have a file somewhere that is easily updatable. If I am adding articles to my dropdown, and now I already have 8 articles, every time I put a new file, I am forced to open the 8 articles, which are 8 different html files. When I'm 25 it's going to be a hassle to open them all one by one. I think the best has to be an html or javascript file where my editable menu is.