Forums
This topic is locked
Template Rollovers Don't work when applied to page
Posted 02 Jun 2005 01:13:46
1
has voted
02 Jun 2005 01:13:46 andrena mz posted:
DW MX V6.0Created layout in Photoshop 6.0 with rollovers. Exported to DW. SAved as template. Viewed template in browser, everything works wonderful. Problem begins when I apply the template to a regular HTML page: The rollovers don't work. What's wrong here??? Code pasted below of template applied to HTML page.
<pre id=code><font face=courier size=2 id=code> <HTML><!-- InstanceBegin template="/Templates/temp.dwt" codeOutsideHTMLIsLocked="false" -->
<HEAD>
<!-- InstanceBeginEditable name="doctitle" -->
<TITLE>temp</TITLE>
<!-- InstanceEndEditable -->
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<!-- ImageReady Preload Script (content.psd) -->
<SCRIPT LANGUAGE="JavaScript">
<!--
function newImage(arg) {
if (document.images) {
rslt = new Image();
rslt.src = arg;
return rslt;
}
}
function changeImages() {
if (document.images && (preloadFlag == true)) {
for (var i=0; i<changeImages.arguments.length; i+=2) {
document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
}
}
}
var preloadFlag = false;
function preloadImages() {
if (document.images) {
temp_02_temp_14_over = newImage("images/temp_02-temp_14_over.gif"
temp_04_over = newImage("images/temp_04-over.gif"
temp_06_temp_04_over = newImage("images/temp_06-temp_04_over.gif"
temp_07_over = newImage("images/temp_07-over.gif"
temp_09_over = newImage("images/temp_09-over.gif"
temp_10_temp_09_over = newImage("images/temp_10-temp_09_over.gif"
temp_11_over = newImage("images/temp_11-over.gif"
temp_13_temp_14_over = newImage("images/temp_13-temp_14_over.gif"
temp_14_over = newImage("images/temp_14-over.gif"
temp_16_temp_14_over = newImage("images/temp_16-temp_14_over.gif"
preloadFlag = true;
}
}
// -->
</SCRIPT>
<!-- End Preload Script -->
<!-- InstanceBeginEditable name="head" -->
<!-- ImageReady Preload Script (content.psd) -->
<SCRIPT LANGUAGE="JavaScript">
<!--
function newImage(arg) {
if (document.images) {
rslt = new Image();
rslt.src = arg;
return rslt;
}
}
function changeImages() {
if (document.images && (preloadFlag == true)) {
for (var i=0; i<changeImages.arguments.length; i+=2) {
document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
}
}
}
var preloadFlag = false;
function preloadImages() {
if (document.images) {
temp_02_temp_14_over = newImage("images/temp_02-temp_14_over.gif"
temp_04_over = newImage("images/temp_04-over.gif"
temp_06_temp_04_over = newImage("images/temp_06-temp_04_over.gif"
temp_07_over = newImage("images/temp_07-over.gif"
temp_09_over = newImage("images/temp_09-over.gif"
temp_10_temp_09_over = newImage("images/temp_10-temp_09_over.gif"
temp_11_over = newImage("images/temp_11-over.gif"
temp_13_temp_14_over = newImage("images/temp_13-temp_14_over.gif"
temp_14_over = newImage("images/temp_14-over.gif"
temp_16_temp_14_over = newImage("images/temp_16-temp_14_over.gif"
preloadFlag = true;
}
}
// -->
</SCRIPT>
<!-- End Preload Script -->
<!-- InstanceEndEditable -->
</HEAD>
<BODY BGCOLOR=#FFFFFF ONLOAD="preloadImages();">
<!-- ImageReady Slices (content.psd) -->
<TABLE WIDTH=775 BORDER=0 align="center" CELLPADDING=0 CELLSPACING=0>
<TR>
<TD> <IMG SRC="../template/images/spacer.gif" WIDTH=11 HEIGHT=1></TD>
<TD> <IMG SRC="../template/images/spacer.gif" WIDTH=1 HEIGHT=1></TD>
<TD> <IMG SRC="../template/images/spacer.gif" WIDTH=225 HEIGHT=1></TD>
<TD> <IMG SRC="../template/images/spacer.gif" WIDTH=1 HEIGHT=1></TD>
<TD> <IMG SRC="../template/images/spacer.gif" WIDTH=5 HEIGHT=1></TD>
<TD> <IMG SRC="../template/images/spacer.gif" WIDTH=532 HEIGHT=1></TD>
<TD></TD>
</TR>
<TR>
<TD COLSPAN=5> <IMG SRC="../template/images/temp_01.gif" WIDTH=243 HEIGHT=2></TD>
<TD ROWSPAN=11> <IMG NAME="temp_02" SRC="../template/images/temp_02.gif" WIDTH=532 HEIGHT=160></TD>
<TD> <IMG SRC="../template/images/spacer.gif" WIDTH=1 HEIGHT=2></TD>
</TR>
<TR>
<TD ROWSPAN=12 bgcolor="#CCCCCC"> <IMG SRC="../template/images/temp_03.gif" WIDTH=11 HEIGHT=432></TD>
<TD COLSPAN=2> <A HREF="../template/temp.html"
ONMOUSEOVER="changeImages('temp_04', 'images/temp_04-over.gif', 'temp_06', 'images/temp_06-temp_04_over.gif'); return true;"
ONMOUSEOUT="changeImages('temp_04', 'images/temp_04.gif', 'temp_06', 'images/temp_06.gif'); return true;">
<IMG NAME="temp_04" SRC="../template/images/temp_04.gif" WIDTH=226 HEIGHT=26 BORDER=0></A></TD>
<TD COLSPAN=2 ROWSPAN=8 bgcolor="#CCCCCC"><!--DWLayoutEmptyCell--> </TD>
<TD> <IMG SRC="../template/images/spacer.gif" WIDTH=1 HEIGHT=26></TD>
</TR>
<TR>
<TD COLSPAN=2> <IMG NAME="temp_06" SRC="../template/images/temp_06.gif" WIDTH=226 HEIGHT=8></TD>
<TD> <IMG SRC="../template/images/spacer.gif" WIDTH=1 HEIGHT=8></TD>
</TR>
<TR>
<TD COLSPAN=2> <A HREF="companyinfo.htm"
ONMOUSEOVER="changeImages('temp_07', 'images/temp_07-over.gif'); return true;"
ONMOUSEOUT="changeImages('temp_07', 'images/temp_07.gif'); return true;">
<IMG NAME="temp_07" SRC="../template/images/temp_07.gif" WIDTH=226 HEIGHT=26 BORDER=0></A></TD>
<TD> <IMG SRC="../template/images/spacer.gif" WIDTH=1 HEIGHT=26></TD>
</TR>
<TR>
<TD COLSPAN=2> <IMG SRC="../template/images/temp_08.gif" WIDTH=226 HEIGHT=6></TD>
<TD> <IMG SRC="../template/images/spacer.gif" WIDTH=1 HEIGHT=6></TD>
</TR>
<TR>
<TD COLSPAN=2> <A HREF="../wellmonitoring/wellmonitoring.htm"
ONMOUSEOVER="changeImages('temp_09', 'images/temp_09-over.gif', 'temp_10', 'images/temp_10-temp_09_over.gif'); return true;"
ONMOUSEOUT="changeImages('temp_09', 'images/temp_09.gif', 'temp_10', 'images/temp_10.gif'); return true;">
<IMG NAME="temp_09" SRC="../template/images/temp_09.gif" WIDTH=226 HEIGHT=26 BORDER=0></A></TD>
<TD> <IMG SRC="../template/images/spacer.gif" WIDTH=1 HEIGHT=26></TD>
</TR>
<TR>
<TD COLSPAN=2> <IMG NAME="temp_10" SRC="../template/images/temp_10.gif" WIDTH=226 HEIGHT=8></TD>
<TD> <IMG SRC="../template/images/spacer.gif" WIDTH=1 HEIGHT=8></TD>
</TR>
<TR>
<TD COLSPAN=2> <A HREF="../clientdata/clientdata.htm"
ONMOUSEOVER="changeImages('temp_11', 'images/temp_11-over.gif'); return true;"
ONMOUSEOUT="changeImages('temp_11', 'images/temp_11.gif'); return true;">
<IMG NAME="temp_11" SRC="../template/images/temp_11.gif" WIDTH=226 HEIGHT=26 BORDER=0></A></TD>
<TD> <IMG SRC="../template/images/spacer.gif" WIDTH=1 HEIGHT=26></TD>
</TR>
<TR>
<TD COLSPAN=2> <IMG SRC="../template/images/temp_12.gif" WIDTH=226 HEIGHT=5></TD>
<TD> <IMG SRC="../template/images/spacer.gif" WIDTH=1 HEIGHT=5></TD>
</TR>
<TR>
<TD ROWSPAN=4 bgcolor="#CCCCCC"> <IMG NAME="temp_13" SRC="../template/images/temp_13.gif" WIDTH=0 HEIGHT=0></TD>
<TD COLSPAN=2> <A HREF="../webmail/webmail.htm"
ONMOUSEOVER="changeImages('temp_02', 'images/temp_02-temp_14_over.gif', 'temp_13', 'images/temp_13-temp_14_over.gif', 'temp_14', 'images/temp_14-over.gif', 'temp_16', 'images/temp_16-temp_14_over.gif'); return true;"
ONMOUSEOUT="changeImages('temp_02', 'images/temp_02.gif', 'temp_13', 'images/temp_13.gif', 'temp_14', 'images/temp_14.gif', 'temp_16', 'images/temp_16.gif'); return true;">
<IMG NAME="temp_14" SRC="../template/images/temp_14.gif" WIDTH=226 HEIGHT=26 BORDER=0></A></TD>
<TD ROWSPAN=4 bgcolor="#CCCCCC"><!--DWLayoutEmptyCell--> </TD>
<TD> <IMG SRC="../template/images/spacer.gif" WIDTH=1 HEIGHT=26></TD>
</TR>
<TR> <!-- InstanceBeginEditable name="left" -->
<td colspan=2 rowspan=3 valign="top" bgcolor="#CCCCCC"><table width="100%" border="0" cellpadding="7">
<tr>
<td> </td>
</tr>
</table> </td>
<!-- InstanceEndEditable -->
<TD> <IMG SRC="../template/images/spacer.gif" WIDTH=1 HEIGHT=1></TD>
</TR>
<TR>
<TD> <IMG SRC="../template/images/temp_17.gif" WIDTH=532 HEIGHT=1></TD>
<TD> <IMG SRC="../template/images/spacer.gif" WIDTH=1 HEIGHT=1></TD>
</TR>
<TR> <!-- InstanceBeginEditable name="content" -->
<td valign="top"> <table width="100%" border="0" cellpadding="7">
<tr>
<td> </td>
</tr>
</table>
<p> </p></td>
<!-- InstanceEndEditable -->
<TD> <IMG SRC="../template/images/spacer.gif" WIDTH=1 HEIGHT=273></TD>
</TR>
</TABLE>
<!-- End ImageReady Slices -->
</BODY>
<!-- InstanceEnd --></HTML></font id=code></pre id=code>