|
Hello,
I am learning to use the templates in Dreamweaver MX.
I have a script that goes into the head and another that goes after the <body on load> tag. I want to keep these
two items together in the template but be able to edit the
body later on in the page I am inserting the template
into (as well as the meta and title).
So, here's the problem. I put the head script into an editable region:
<head>
<!--#BeginEditable "doctitle" -->
<title>Untitled Document</title>
<!-- #EndEditable -->
<!--#BeginEditable "scripts" -->
<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;
}
-blah blah blah.... and several other Fireworks scripts...-
</script>
<script language="JavaScript1.2" src="../NEWSITE/Fireworks/mm_menu.js"></script>
<!-- #EndEditable -->
Then I added:
<!--#BeginEditable "scripts" --><body onLoad="MM_preloadImages'...gif','.. blah blah blah
I am confused by dropping this declaration of body into my page because it keeps giving me an error, I think there are too many heads and body's. Maybe its all the fireworks code? The error was on the <body on load> line. I really appreciate anyone's advise, I know it a bit messy!
(here is more full page code)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- 2/13/06 11:28 -->
<html><head><title> </title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="description" content="">
<META NAME="KEYWORDS" CONTENT=" ">
<link href="../Templates" rel="stylesheet" type="text/css">
<link href="../Templates/headings" rel="stylesheet" type="text/css">
<!-- InstanceBegin template="/Templates/PageTemplate.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<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;
}
blah blah
</script>
<script language="JavaScript">
<!--
function mmLoadMenus() {
blah blah
</script>
<script language="JavaScript1.2" src="../Fireworks/mm_menu.js"></script>
<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
</head>
<body onLoad="MM_preloadImages('../Fireworks/images/buttons_r1_c3_f2.gif','..
<table width="55%" border="0" align="center" </embed>
</object> </td>
</tr>
<tr>
<td height="98"> <table width="599" border="0" align="center" cellpadding="0" cellspacing="0">
<!-- fwtable fwsrc="buttons.png" fwbase="buttons.gif" fwstyle="Dreamweaver" fwdocid = "742308039" fwnested="0" -->
fireworks blah blah ...
</table>
<script language="JavaScript1.2">mmLoadMenus();</script></td>
</tr>
</table>
<table width="78%" height="841" border="0
" align="center" cellpadding="3" bgcolor="#FFFFFF">
<tr>
<td height="265" colspan="3">
<!-- InstanceBeginEditable name="flashmovie" -->
<div align="center">
<p class="headings"><br>
<object
flash movie code here
</embed></object>
</p>
</div>
<!-- InstanceEndEditable --></td>
</tr>
<tr>
<td width="33%" height="265"><!-- InstanceBeginEditable name="EditRegion1" -->
<h1 class="headings"></h1>
<li>
we
<li> we
<li class="newsite">
we
<li>
we
</li>
<!-- InstanceEndEditable --></td>
<td width="32%"><!-- InstanceBeginEditable name="EditRegion2" --><!-- InstanceEndEditable --></td>
<td width="35%"><!-- InstanceBeginEditable name="EditRegion3" --><!-- InstanceEndEditable --></td>
</tr>
<tr>
</tr>
<tr>
<td colspan="3"><div align="center"><!-- #BeginLibraryItem "/NEWSITE/Library/bottomtext.lbi" --> <div align="center"><font color="#333333" size="-3" face="Arial, Helvetica, sans-serif"><b>G</b></font></div><!-- #EndLibraryItem --></div></td>
</tr>
</table>
<p> </p>
</body>
<!-- InstanceEnd -->
</html>
Thank you anyone who knows how to do this!
|