PDA

View Full Version : help



Rika24
10-21-2004, 09:49 PM
how can i make it so that all i have to do is edit one page & the menus on both sides of each of my pages changes? because addind 1 affiliate means i have to go through every page on my site, is there a way i can change it so all i have 2 do is change 1 page? (the web host won't let me use phtml or shtml) this is my site http://www.rikafire.50megs.com

cr3ative
10-22-2004, 06:39 AM
You might be able to write an external script which writes lines to HTML when called.

I don't know exactly how to but I'm sure someone here could explain document.write("content");

cr3ative

Rika24
10-27-2004, 08:01 PM
? how can i?

gigabites
11-03-2004, 08:20 AM
OK well.. I think You can try something like this..



<script language="javascript">
function left_menu()
{
document.write('<a class="menulinks" href=/about.html>Digimon&nbsp;Adventure </a><br>');
document.write('<a class="menulinks" href=/catalog.html>Digimon&nbsp;Adventure 2 </a><br>');
}
function right_menu()
{
document.write('<a href="http://www.onlinedigimon.com" TARGET="blank"><img src="http://www.onlinedigimon.com/images/icon.gif" width="88" height="31" alt="Online Digimon" border="0"></a><br>');
document.write('<a href="http://geocities.com/darklee12" TARGET="blank"><img src="http://www.rikafire.50megs.com/images/TDI2.JPG" width="88" height="31" alt="Digimon Invasion" border="0"></a><br>');
}
</script>


Save it as, for example menu.js

add
<script type="text/javascript" src="menu.js"></script> inside the <head>

tag on each of Your page.

And then replace Your left menu with
<script language="javascript">left_menu()</script> and replace Your right menu with
<script language="javascript">left_menu()</script>

Get the idea?

Now, if You want to change something, just modify menu.js

Gee.. I hope that works, I haven't try it myself though :p