Hey,
I have a problem and am hoping that you can help me find a solution.

I have a site created in dreamweaver. To do this, I made a template, with 2 editable regions, then set up all my pages.

The problem I am having, is that I am trying to create a separate template, inside my site, but when I do this, all rollover effects disappear. It makes no sense to me whatsoever, as all urls are exactly the same(it shows the images I used for my buttons for example). The swap image behaviours are still there, everything is connected, it just does not work.

Any help would be much appreciated, I will give any code needed.

cross posted here: http://www.dreamweaverclub.com/forum/showthread.php?t=38089

Dani AI

Generated

— when rollovers work in one template but stop in another, the issue is usually environmental rather than the swap code itself. 's question about where the second template sits is relevant: template location and what it includes can change paths, scripts, and the DOM that your rollovers depend on.

Common checks and causes to run through quickly:

  • Open the browser Console; one JS error early on will halt later scripts.
  • Use the Network panel to confirm the rollover images and helper scripts actually load (no 404s).
  • Inspect the DOM for positioned or transparent elements layered over the buttons; such overlays intercept mouse events.
  • Ensure elements targeted by your rollover code have unique IDs across templates so functions point to the right node.
  • Confirm any Dreamweaver-generated helper scripts are present once in the page head and not omitted or duplicated by the second template.
  • Verify relative vs root-relative paths — templates in subfolders often break relative asset links.

A concise debug workflow: load the page, check Console for errors, switch to Elements and temporarily disable suspect CSS (pointer-events, z-index) to see if the rollover returns, then confirm Network requests. Isolate the problem by creating a minimal page with just one rollover element and no template includes; if that works, add template pieces back one at a time.

For a more robust, modern approach use CSS hover/sprites instead of script-based swaps. Example:

a.btn {
  display:inline-block;
  width:120px;
  height:40px;
  background:url('/images/buttons-sprite.png') 0 0 no-repeat;
}
a.btn:hover {
  background-position:0 -40px;
}

See MDN: :hover and MDN: pointer-events for details, and use the browser DevTools (Elements / Console / Network) to trace the exact cause.

Recommended Answers

All 2 Replies

Whats this seperate template for and where shall it be placed with-in the siite?

Sorry, forgot all about this post, turns out I had an extra layer of pictures on top that came from slicing in photoshop.

I scrapped all that and just ended up using 1 image and some css

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.