Forum Moderators: open
Within my header.asp file i have <body bgcolor="#000000" topmargin="0" onLoad="MM_preloadImages('images/nav%20buttons/Home%20Y.jpg','images/nav%20buttons/Biog%20Y.jpg','images/nav%20buttons/Album%20Y.jpg','images/nav%20buttons/News%20Y.jpg','images/nav%20buttons/Contact%20Y.jpg')">
above this is script for rollover images.
In my index.asp i also need to include a topmargin="0" so there are no gaps at all between the header.asp and index.asp design. but i cannot seem to do this as i already use a <body> in the header.asp. Is there any way around this problem
thanks
Im using the body tag in my header, as it uses rollover and javascript. If i could put the <body bgcolor="#000000" topmargin="0" etc.. in my index.asp code, i think the problem would resolve its self. But then my navigation code in the header.asp would not work.
here part of the code:
header.asp
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<body bgcolor="#000000" topmargin="0" onLoad="MM_preloadImages('images/nav%20buttons/Home%20Y.jpg','images/nav%20buttons/Biog%20Y.jpg','images/nav%20buttons/Album%20Y.jpg','images/nav%20buttons/News%20Y.jpg','images/nav%20buttons/Contact%20Y.jpg')">
<table width="760" height="121" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="760" height="94" valign="top"><img src="images/MainTopPanel.jpg" width="760" height="94"></td>
</tr>
<tr>
<td height="24" valign="top" bgcolor="#FFFFFF"><div align="left"><a href="index.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image2','','images/nav%20buttons/Home%20Y.jpg',1)"><img src="images/nav%20buttons/Home%20W.jpg" alt="home" name="Image2" width="259" border="0"></a><a href="biography.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image3','','images/nav%20buttons/Biog%20Y.jpg',1)"><img src="images/nav%20buttons/Biog%20W.jpg" alt="biography" name="Image3" width="125" border="0"></a><a href="album.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image4','','images/nav%20buttons/Album%20Y.jpg',1)"><img src="images/nav%20buttons/Album%20W.jpg" alt="album" name="Image4" width="92" border="0"></a><a href="news.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image5','','images/nav%20buttons/News%20Y.jpg',1)"><img src="images/nav%20buttons/News%20W.jpg" alt="news and gigs" name="Image5" width="128" border="0"></a><a href="contact.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image6','','images/nav%20buttons/Contact%20Y.jpg',1)"><img src="images/nav%20buttons/Contact%20W.jpg" alt="contacts" name="Image6" width="156" border="0"></a>
</div></td>
</tr>
</table>
top part of index.asp
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="celtic.css" rel="stylesheet" type="text/css" />
<!--#include file="header.asp" --><br>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr valign="top">
<td width="68" height="186" rowspan="2"> </td>
<td width="181" class="maintext"><img src="images/HomePic.jpg" width="121" height="155" border="0" align="top" /></td>
<td width="3" rowspan="2" bgcolor="#FFCC33">
</td>
<td width="7" rowspan="2"><h1>
<span class="maintext">
</span></h1>
</td>
<td width="501" rowspan="2"><h1>
hope this help and thanks
your stuff should run like this
<html>
<head>
<title>some page</title>
<script>Put your scripts external!</script>
<meta>blach
<meta>blan
</head>
<body deprecated_elements="blah">
<table>.......
Not the wat you have it ;)
Nick