PDA

View Full Version : Duplicate Head Tags in dreamweaver template


legbreak
06-30-2007, 09:47 PM
Hi all,

My first time in the forum, and also a newbie with Dreamweaver, so please be patient with me.

I am trying to create a page with repeating tables on it so that the website owner can log in and add information to the page. I created the page fine, but when I add any template elements, I am getting error messages that I have duplicate head tags.

I know that I should only have one set of head tags in each document, but not sure what would be the safest way of removing the offending articles from the code, and indeed where they came from in the first place.

The full page, without the template elements is at http://www.kittywinter.com/theatre.html

The code for the page with repeating table is below ( I have just included the first chunk of code. I would be extremely grateful for any suggestions of what I am doing wrong, and how not to do it again next time. Thanks in advance. Here is the code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<A href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="Keywords" content="Movement Director
Kitty
Winter
Theatre
Stage
Ballerophon
Taikonaut
Lark Rise
Physick
Actor" />
<meta name="Description" content="Kitty Winter - Movement Director - My Theatre Work" />
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- TemplateBeginEditable name="head" --><!-- TemplateEndEditable -->
</head>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- TemplateBeginEditable name="doctitle" -->
<title>Kitty Winter - Theatre Work</title>
<!-- TemplateEndEditable -->
<style type="text/css">
<!--
#container {
margin-right: auto;
margin-left: auto;
width: 785px;
float: none;
left: auto;
right: auto;
}
#container #header {
height: 150px;
width: 785px;
background-image: url(file:///D|/The Labyrinth/The Fog/Kitty's Website dreamweaver/Web files/images/buttons-homepage.gif);
background-repeat: no-repeat;
background-position: right top;
background-color: #FFFFFF;
}
#container #footer {
width: 785px;
}
#container #fullpanetable {
vertical-align: top;
display: block;
background-repeat: no-repeat;
background-position: left top;
}
.table-padding {
padding-top: 0px;
padding-bottom: 0px;
}
.style1 {font-size: 14px}
-->
</style>
<link href="../Style Sheets/kittywinter-sitewide.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.picture-captions { font-family: "Trebuchet MS", Arial, Georgia;
font-size: 10px;
color: #000080;
text-align: right;
font-weight: lighter;
text-transform: lowercase;
white-space: normal;
vertical-align: top;
}
.picture-padding { background-position: center;
padding-top: 18px;
padding-right: 8px;
padding-bottom: 0px;
padding-left: 8px;
}
.tablecolumntop {
background-position: top;
vertical-align: top;
}
#apDiv1 {
position:absolute;
width:200px;
height:115px;
z-index:1;
}
#apDiv2 {
position:absolute;
width:785px;
height:149px;
z-index:2;
left: 97px;
top: 16px;
}
#apDiv3 {
position:absolute;
width:52px;
height:234px;
z-index:1;
left: 545px;
top: 153px;
}
.style2 {color: #2A3F00}
body {
background-color: #F5F9FE;
margin-top: 0px;
}
.editable-table-cell-padding {
padding-left: 20px;
}
-->
</style>
<script 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>
</head>

davidj
07-01-2007, 10:18 AM
Hi guys

if you have a solution to a problem a member has highlighted its best that the solution be posted in the forum as this would benefit others

domedia
07-03-2007, 05:37 PM
Hi Leg,

You can only have one starting and ending header tag on your website, that is what the error msg means
<head>Head info here</head>

I think you must somehow have gotten into to codeview and accidentally edited some lines, because it was all screwed up. I tried to clean it up as much has possible. This chunk of code is all valid:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- TemplateBeginEditable name="doctitle" -->
<title>Kitty Winter - Theatre Work</title>
<!-- TemplateEndEditable -->
<!-- TemplateBeginEditable name="head" -->
<meta name="Keywords" content="Movement Director, Kitty, Winter , Theatre, Stage, Ballerophon, Taikonaut, Lark Rise, Physick, Actor" />
<meta name="Description" content="Kitty Winter - Movement Director - My Theatre Work" />
<!-- TemplateEndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
<!--
#container {
margin-right: auto;
margin-left: auto;
width: 785px;
float: none;
left: auto;
right: auto;
}
#container #header {
height: 150px;
width: 785px;
background-image: url(file:///D|/The Labyrinth/The Fog/Kitty's Website dreamweaver/Web files/images/buttons-homepage.gif);
background-repeat: no-repeat;
background-position: right top;
background-color: #FFFFFF;
}
#container #footer {
width: 785px;
}
#container #fullpanetable {
vertical-align: top;
display: block;
background-repeat: no-repeat;
background-position: left top;
}
.table-padding {
padding-top: 0px;
padding-bottom: 0px;
}
.style1 {font-size: 14px}
-->
</style>
<link href="../Style Sheets/kittywinter-sitewide.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.picture-captions { font-family: "Trebuchet MS", Arial, Georgia;
font-size: 10px;
color: #000080;
text-align: right;
font-weight: lighter;
text-transform: lowercase;
white-space: normal;
vertical-align: top;
}
.picture-padding { background-position: center;
padding-top: 18px;
padding-right: 8px;
padding-bottom: 0px;
padding-left: 8px;
}
.tablecolumntop {
background-position: top;
vertical-align: top;
}
#apDiv1 {
position:absolute;
width:200px;
height:115px;
z-index:1;
}
#apDiv2 {
position:absolute;
width:785px;
height:149px;
z-index:2;
left: 97px;
top: 16px;
}
#apDiv3 {
position:absolute;
width:52px;
height:234px;
z-index:1;
left: 545px;
top: 153px;
}
.style2 {color: #2A3F00}
body {
background-color: #F5F9FE;
margin-top: 0px;
}
.editable-table-cell-padding {
padding-left: 20px;
}
-->
</style>
<script 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>
</head>

legbreak
07-03-2007, 07:06 PM
Many thanks to domedia (and prolauche) for the invaluable help.
The webpage is now up and running, and I am feeling calmer and a little more educated in the ways of dw.

Many only regret is that I am not yet good enough to repay the favour by answering other queries on this forum. But maybe in time...

Legbreak.

domedia
07-03-2007, 07:16 PM
Hey Leg, just hang out and have a good time. Sometimes reading other threads gives you ideas you never had before.

Plus it seems we'll be adding some fun stuff here, from what I read in the Dreamweaver Club Cafe forum 8)