You are being confused by a) not understanding root relative
vs document
relative links, and b) not understanding how DW previews
files.
If I have a document with a link to an image that looks like
this -
<img src="/images/foo.gif"...
That's what's called a root relative link.
If I preview that document in DW, then the browser gets the
document, sees
the leading "/" and reads that as the root of the hard drive,
since the
browser has no idea where the root of the site is. Thus, the
image is
broken in the preview.
If I have temp files enabled, then DW will secretly convert
the file being
previewed into a temporary file, and hand that to the
browser. This temp
file has had all root relative links converted to document
relative links
(as you will see by looking at the code in the browser), and
has had all
include files actually embedded in the page, and has had all
external CSS
and js markup embedded in the page. In other words, DW has
made the
document into a stand-alone page.
If you do not have temp files enabled, all of these links
would be broken on
preview.
Now - if you are using root relative links, AND you have temp
files enabled,
AND you click away from the previewed document, then all of
your links will
be broken, since DW has not made that linked file into a temp
file. This is
what you are seeing.
So - if you want to click away on preview, then you must use
document
relative links for the site -
<img src="../images/foo.gif"... (for example)
These will still work on preview since the browser knows how
to determine
the current file's location and how to follow that path.
GEDDIT?
--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
==================
"Marney" <webforumsuser@macromedia.com> wrote in
message
news:gh9arc$7qe$1@forums.macromedia.com...
> Hi Murray,
>
> Thanks for response. I understand what you are saying
about root relative
> links but it's not working. If, eg, I preview
default.htm in browers from
> DW,
> it's all there. Click any link and the images are gone.
I read something
> that
> led me to upload to server and try. Then, even the
default page images
> were
> gone. When I detached all from the template and editted
all the code to
> make it
> doc relative, it all worked fine but that doesn't solve
anything.
>
> I looked at the site def'n and could see no way to make
it doc relative
> again
> (DW MX). I created this def'n the same as always. I
looked to see what
> would
> happen in another site that's years old.. suddenly it's
doing this too.
>
> Right now, this is my kid's first site for homework and
mommy is not
> looking
> to smart. Any further thoughts?
>
> Thanks.
>