db1games
12-10-2004, 05:39 PM
I know how to externally load XML, CSS and Javascript code into a file, but can you do the same thing with HTML?
In my page head I have
<SCRIPT language="JavaScript" SRC="http://db1games.topcities.com/header.js"></SCRIPT> to load some code for the mouseover links - this means when I add a page I don't need to change everything.
I then have a bit lower down which says
<table>
<tr>
<td width="580">
</center><a href="http://db1games.topcities.com/index.htm"
onmouseover="buttondown('homebutton')"
onmouseout="buttonup('homebutton')">
<img src="http://db1games.topcities.com/homebutton.gif" name="homebutton" border="0" />
</a>
<a href="http://db1games.topcities.com/games.htm"
onmouseover="buttondown('gamesbutton')"
onmouseout="buttonup('gamesbutton')">
<img src="http://db1games.topcities.com/gamesbutton.gif" name="gamesbutton" border="0" />
</a>
<a href="http://db1games.topcities.com/blog.html"
onmouseover="buttondown('blogbutton')"
onmouseout="buttonup('blogbutton')">
<img src="http://db1games.topcities.com/blogbutton.gif" name="blogbutton" border="0" />
</a>
<a href="http://db1games.topcities.com/thanks.htm"
onmouseover="buttondown('thanksbutton')"
onmouseout="buttonup('thanksbutton')">
<img src="http://db1games.topcities.com/thanksbutton.gif" name="thanksbutton" border="0" />
</a>
<a href="http://db1games.topcities.com/links.htm"
onmouseover="buttondown('linksbutton')"
onmouseout="buttonup('linksbutton')">
<img src="http://db1games.topcities.com/linksbutton.gif" name="linksbutton" border="0" />
</a>
</td></tr></table>
can I put this code in an external file and then link to it from every page like I do with CSS, Javascript and XML?
If so, how?
In my page head I have
<SCRIPT language="JavaScript" SRC="http://db1games.topcities.com/header.js"></SCRIPT> to load some code for the mouseover links - this means when I add a page I don't need to change everything.
I then have a bit lower down which says
<table>
<tr>
<td width="580">
</center><a href="http://db1games.topcities.com/index.htm"
onmouseover="buttondown('homebutton')"
onmouseout="buttonup('homebutton')">
<img src="http://db1games.topcities.com/homebutton.gif" name="homebutton" border="0" />
</a>
<a href="http://db1games.topcities.com/games.htm"
onmouseover="buttondown('gamesbutton')"
onmouseout="buttonup('gamesbutton')">
<img src="http://db1games.topcities.com/gamesbutton.gif" name="gamesbutton" border="0" />
</a>
<a href="http://db1games.topcities.com/blog.html"
onmouseover="buttondown('blogbutton')"
onmouseout="buttonup('blogbutton')">
<img src="http://db1games.topcities.com/blogbutton.gif" name="blogbutton" border="0" />
</a>
<a href="http://db1games.topcities.com/thanks.htm"
onmouseover="buttondown('thanksbutton')"
onmouseout="buttonup('thanksbutton')">
<img src="http://db1games.topcities.com/thanksbutton.gif" name="thanksbutton" border="0" />
</a>
<a href="http://db1games.topcities.com/links.htm"
onmouseover="buttondown('linksbutton')"
onmouseout="buttonup('linksbutton')">
<img src="http://db1games.topcities.com/linksbutton.gif" name="linksbutton" border="0" />
</a>
</td></tr></table>
can I put this code in an external file and then link to it from every page like I do with CSS, Javascript and XML?
If so, how?