Get ready for BLACK FRIDAY shopping starting in

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.0

Created 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> &lt;HTML&gt;&lt;!-- InstanceBegin template="/Templates/temp.dwt" codeOutsideHTMLIsLocked="false" --&gt;
&lt;HEAD&gt;
&lt;!-- InstanceBeginEditable name="doctitle" --&gt;
&lt;TITLE&gt;temp&lt;/TITLE&gt;
&lt;!-- InstanceEndEditable --&gt;
&lt;META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"&gt;
&lt;!-- ImageReady Preload Script (content.psd) --&gt;
&lt;SCRIPT LANGUAGE="JavaScript"&gt;
&lt;!--

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&lt;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;
}
}

// --&gt;
&lt;/SCRIPT&gt;
&lt;!-- End Preload Script --&gt;
&lt;!-- InstanceBeginEditable name="head" --&gt;


&lt;!-- ImageReady Preload Script (content.psd) --&gt;
&lt;SCRIPT LANGUAGE="JavaScript"&gt;
&lt;!--

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&lt;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;
}
}

// --&gt;
&lt;/SCRIPT&gt;
&lt;!-- End Preload Script --&gt;
&lt;!-- InstanceEndEditable --&gt;
&lt;/HEAD&gt;
&lt;BODY BGCOLOR=#FFFFFF ONLOAD="preloadImages();"&gt;
&lt;!-- ImageReady Slices (content.psd) --&gt;
&lt;TABLE WIDTH=775 BORDER=0 align="center" CELLPADDING=0 CELLSPACING=0&gt;
&lt;TR&gt;
&lt;TD&gt; &lt;IMG SRC="../template/images/spacer.gif" WIDTH=11 HEIGHT=1&gt;&lt;/TD&gt;
&lt;TD&gt; &lt;IMG SRC="../template/images/spacer.gif" WIDTH=1 HEIGHT=1&gt;&lt;/TD&gt;
&lt;TD&gt; &lt;IMG SRC="../template/images/spacer.gif" WIDTH=225 HEIGHT=1&gt;&lt;/TD&gt;
&lt;TD&gt; &lt;IMG SRC="../template/images/spacer.gif" WIDTH=1 HEIGHT=1&gt;&lt;/TD&gt;
&lt;TD&gt; &lt;IMG SRC="../template/images/spacer.gif" WIDTH=5 HEIGHT=1&gt;&lt;/TD&gt;
&lt;TD&gt; &lt;IMG SRC="../template/images/spacer.gif" WIDTH=532 HEIGHT=1&gt;&lt;/TD&gt;
&lt;TD&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD COLSPAN=5&gt; &lt;IMG SRC="../template/images/temp_01.gif" WIDTH=243 HEIGHT=2&gt;&lt;/TD&gt;
&lt;TD ROWSPAN=11&gt; &lt;IMG NAME="temp_02" SRC="../template/images/temp_02.gif" WIDTH=532 HEIGHT=160&gt;&lt;/TD&gt;
&lt;TD&gt; &lt;IMG SRC="../template/images/spacer.gif" WIDTH=1 HEIGHT=2&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD ROWSPAN=12 bgcolor="#CCCCCC"&gt; &lt;IMG SRC="../template/images/temp_03.gif" WIDTH=11 HEIGHT=432&gt;&lt;/TD&gt;
&lt;TD COLSPAN=2&gt; &lt;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;"&gt;
&lt;IMG NAME="temp_04" SRC="../template/images/temp_04.gif" WIDTH=226 HEIGHT=26 BORDER=0&gt;&lt;/A&gt;&lt;/TD&gt;
&lt;TD COLSPAN=2 ROWSPAN=8 bgcolor="#CCCCCC"&gt;&lt;!--DWLayoutEmptyCell--&gt;&nbsp; &lt;/TD&gt;
&lt;TD&gt; &lt;IMG SRC="../template/images/spacer.gif" WIDTH=1 HEIGHT=26&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD COLSPAN=2&gt; &lt;IMG NAME="temp_06" SRC="../template/images/temp_06.gif" WIDTH=226 HEIGHT=8&gt;&lt;/TD&gt;
&lt;TD&gt; &lt;IMG SRC="../template/images/spacer.gif" WIDTH=1 HEIGHT=8&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD COLSPAN=2&gt; &lt;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;"&gt;
&lt;IMG NAME="temp_07" SRC="../template/images/temp_07.gif" WIDTH=226 HEIGHT=26 BORDER=0&gt;&lt;/A&gt;&lt;/TD&gt;
&lt;TD&gt; &lt;IMG SRC="../template/images/spacer.gif" WIDTH=1 HEIGHT=26&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD COLSPAN=2&gt; &lt;IMG SRC="../template/images/temp_08.gif" WIDTH=226 HEIGHT=6&gt;&lt;/TD&gt;
&lt;TD&gt; &lt;IMG SRC="../template/images/spacer.gif" WIDTH=1 HEIGHT=6&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD COLSPAN=2&gt; &lt;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;"&gt;
&lt;IMG NAME="temp_09" SRC="../template/images/temp_09.gif" WIDTH=226 HEIGHT=26 BORDER=0&gt;&lt;/A&gt;&lt;/TD&gt;
&lt;TD&gt; &lt;IMG SRC="../template/images/spacer.gif" WIDTH=1 HEIGHT=26&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD COLSPAN=2&gt; &lt;IMG NAME="temp_10" SRC="../template/images/temp_10.gif" WIDTH=226 HEIGHT=8&gt;&lt;/TD&gt;
&lt;TD&gt; &lt;IMG SRC="../template/images/spacer.gif" WIDTH=1 HEIGHT=8&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD COLSPAN=2&gt; &lt;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;"&gt;
&lt;IMG NAME="temp_11" SRC="../template/images/temp_11.gif" WIDTH=226 HEIGHT=26 BORDER=0&gt;&lt;/A&gt;&lt;/TD&gt;
&lt;TD&gt; &lt;IMG SRC="../template/images/spacer.gif" WIDTH=1 HEIGHT=26&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD COLSPAN=2&gt; &lt;IMG SRC="../template/images/temp_12.gif" WIDTH=226 HEIGHT=5&gt;&lt;/TD&gt;
&lt;TD&gt; &lt;IMG SRC="../template/images/spacer.gif" WIDTH=1 HEIGHT=5&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD ROWSPAN=4 bgcolor="#CCCCCC"&gt; &lt;IMG NAME="temp_13" SRC="../template/images/temp_13.gif" WIDTH=0 HEIGHT=0&gt;&lt;/TD&gt;
&lt;TD COLSPAN=2&gt; &lt;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;"&gt;
&lt;IMG NAME="temp_14" SRC="../template/images/temp_14.gif" WIDTH=226 HEIGHT=26 BORDER=0&gt;&lt;/A&gt;&lt;/TD&gt;
&lt;TD ROWSPAN=4 bgcolor="#CCCCCC"&gt;&lt;!--DWLayoutEmptyCell--&gt;&nbsp; &lt;/TD&gt;
&lt;TD&gt; &lt;IMG SRC="../template/images/spacer.gif" WIDTH=1 HEIGHT=26&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt; &lt;!-- InstanceBeginEditable name="left" --&gt;
&lt;td colspan=2 rowspan=3 valign="top" bgcolor="#CCCCCC"&gt;&lt;table width="100%" border="0" cellpadding="7"&gt;
&lt;tr&gt;
&lt;td&gt;&nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt; &lt;/td&gt;
&lt;!-- InstanceEndEditable --&gt;
&lt;TD&gt; &lt;IMG SRC="../template/images/spacer.gif" WIDTH=1 HEIGHT=1&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt; &lt;IMG SRC="../template/images/temp_17.gif" WIDTH=532 HEIGHT=1&gt;&lt;/TD&gt;
&lt;TD&gt; &lt;IMG SRC="../template/images/spacer.gif" WIDTH=1 HEIGHT=1&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt; &lt;!-- InstanceBeginEditable name="content" --&gt;
&lt;td valign="top"&gt; &lt;table width="100%" border="0" cellpadding="7"&gt;
&lt;tr&gt;
&lt;td&gt;&nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;p&gt;&nbsp;&lt;/p&gt;&lt;/td&gt;
&lt;!-- InstanceEndEditable --&gt;
&lt;TD&gt; &lt;IMG SRC="../template/images/spacer.gif" WIDTH=1 HEIGHT=273&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TABLE&gt;
&lt;!-- End ImageReady Slices --&gt;
&lt;/BODY&gt;
&lt;!-- InstanceEnd --&gt;&lt;/HTML&gt;</font id=code></pre id=code>

Reply to this topic