Forum Moderators: open
I create an HTML page from Photoshop (then ImageReady, etc.) and EVERYTHING works fine. I have my main menu on a rollover behavior (white text on dark BG, that "glows" on mouse rollover). When I "Save optimized as..." a HTML, everything is great.
However, once I convert the HTML to a DWT template file in Dreamweaver, everything still looks great and works--everything EXCEPT my glowing rollovers, which become non-existant in a browser.
The strangest part of it to me is that when I dig into my behaviors and code to see if somehow the rollover changes GIF files, I see that it is IDENTICAL to my HTML that I converted from. Let me explain:
" changeImages('t02_08', 'images/t02_08-over.gif') " is the same in the HTML and the DWT, however it ONLY actually changes (does the rollover action) in the HTML.
So then I thought it was something to do with the templates, and it gets converted back over when you make a new HTML page from the template. NOPE! My cool glow never makes it back onto the new HTML pages... It gets lost somewhere, but I don't know where.
Any help would be greatly appreciated! This is the first time I'm using templates and LOVE the idea, but I just can't get it to work.
For reference info, here is the HTML from the DWT, and then the original HTML:
-----
****DWT*****
<a href="#"
onmouseover="changeImages('t02_08', 'images/t02_08-over.gif'); return true;"
onmouseout="changeImages('t02_08', 'images/t02_08.gif'); return true;"
onmousedown="changeImages('t02_08', 'images/t02_08-over.gif'); return true;"
onmouseup="changeImages('t02_08', 'images/t02_08-over.gif'); return true;">
<img name="t02_08" src="../images/t02_08.gif" width="100" height="43" border="0" alt=""></a></td>
***HTML****
<a href="#"
onmouseover="changeImages('t02_08', 'images/t02_08-over.gif'); return true;"
onmouseout="changeImages('t02_08', 'images/t02_08.gif'); return true;"
onmousedown="changeImages('t02_08', 'images/t02_08-over.gif'); return true;"
onmouseup="changeImages('t02_08', 'images/t02_08-over.gif'); return true;">
<img name="t02_08" src="images/t02_08.gif" width="100" height="43" border="0" alt=""></a></td>
I discovered the same problem when i started using templates, let me guess, the pages that work are in the root folder? the ones that dont are in another
try arsing around with the actual url in the template file
sometimes dreamweaver says an image is
/images/image.jpg
other times
images/images.jpg
that one stupid slash had me for ages!
see if its what has you!
The Del Boy
Live Forever or Die in the attempt
Quite frankly, the server side include approach is more correct as well. My opinion is that Dreamweaver templates are simply for those who aren't aware of include statements.
I am aware for this statement and I am using it over JavaScript to control a banner add. JavaScript is not an immediate load as PHP is instantaneous.
Back to DWT. If you use a include PHP include statment, would you need to use different statement for different sections? E.g header, footer etc?
Please show your example.
Thanks.
I did look at my DWT code and all is compliant. Furthermore, the site load less that 7 seconds. One other solution is to use library files. In addtion, a person can copy code from a file (e.g template - not a DWT) and use the that code throughout his/her site for consistency. But one always must rememeber hierarchy (../images/header or ../../images/header).
Your thoughts are appreciated.
So yes, header and footer are typical.
------------------------------------------------
Browser rendered html of includes_over_dwt.php would look something like this:
<html>
<body>
<img src="this_site_wide_img.jpg">
<img src="that_site_wide_img.jpg">
<a href="global_nav1.php">Page 1</a>
<a href="global_nav2.php">Page 2</a>
<a href="global_nav3.php">Page 3</a>
<a href="global_nav4.php">Page 4</a>
<p>Here is a paragraph of page specific content.</p>
<p>Site wide footer with copyright info etc.</p>
</body>
</html>
-------------------------------------------------
Before browser rendering of html includes_over_dwt.php would look something like this:
<html>
<body>
<? include ('top_page.php');?>
<p>Here is a paragraph of page specific content.</p>
<? include ('footer.php');?>
</body>
</html>
----------------------------------------------
And of course top_page.php is the following:
<img src="this_site_wide_img.jpg">
<img src="that_site_wide_img.jpg">
<a href="global_nav1.php">Page 1</a>
<a href="global_nav2.php">Page 2</a>
<a href="global_nav3.php">Page 3</a>
<a href="global_nav4.php">Page 4</a>
And footer.php is the following:
<p>Here is a paragraph of page specific content.</p>