This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Dreamweaver > April 2004 > Images Showing up On live page
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Images Showing up On live page
|
|
| Fortune Hunter Z 2004-04-30, 5:32 pm |
| I have a strange problem that I have never run into before. I created a page
in DW-MX created a menu with logo and graphics. Used Javascript for menu and
CSS for font and a few other changes. Once it looked and worked the way I
wanted I saved it as a template and started peeling copies off to set up the
individual pages.
I created one page and saved it. When I open the file from the folder by just
double clicking on it and having it just open by default in the browser the
images don't show up. I just get the 'x' like an image should be there.
Normally this would indicate that the path is wrong, except if you open up DW
and look at the page and then click F12 to view it in the browser it looks fine.
Further I had created this site before and everything worked fine. I only
recreated because it was cleaner then trying to fix up my old design.
Either way the effect is weird. Any ideas of where I can look for the problem
in my code. I have looked at everything and nothing seems to jump out. Any
assistance would be appreciated.
| |
|
| two things-
exactly how are you "peeling off" copies?
are you doing New Files dialog box->Template-->that site-->that template?
or, are you doing "save as" ?
second- please give a url address to a page with broken images so the code
can be seen and the reason given
| |
| Murray *TMM* 2004-04-30, 5:32 pm |
| This is how DMX will work if you are using ROOT RELATIVE links, *and*
temporary files to preview.
Here's an example -
* I create a page with a link to an image -> <img src="/images/foo.gif">
(note that the image link is a root relative link)
* I preview that page with DMX (since I am using temp files, DMX is kind
enough to realize that root relative links won't work in a preview, and so
it converts them to document relative links when it builds the temporary
file for the preview) -> <img src="../images/foo.gif"> (I'm assuming that
your document is one level below the root of the site). In the preview,
this page looks fine because the browser has no trouble with the document
relative link - it knows where the file it just opened is, and can follow
the path to the image).
* I then click on a link in the previewed page to another page that also has
ROOT relative linked images --> <img src="/images/bar.gif"> and suddenly
the image does not load.
Why? Because when you click away from the temp file DMX just built for you,
you have lost the benefit of the automatic conversion that DMX does with
root relative links, and the browser looks for this new image starting from
the root of the hard drive, not the root of your site.
The solution is to not use root relative links, and to change all your
existing ones to document relative.
To read more about this, go here -
http://www.macromedia.com/support/d...te_root_rel.htm
--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver MX
(If you *MUST* email me, don't LAUGH when you do so!)
==================
news://forums.macromedia.com/macromedia.dreamweaver - THE BEST WAY TO GET
ANSWERS
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================
"Fortune Hunter Z" <webforumsuser@macromedia.com> wrote in message
news:c6u2hp$bi3$1@forums.macromedia.com...
> I have a strange problem that I have never run into before. I created a
page
> in DW-MX created a menu with logo and graphics. Used Javascript for menu
and
> CSS for font and a few other changes. Once it looked and worked the way I
> wanted I saved it as a template and started peeling copies off to set up
the
> individual pages.
>
> I created one page and saved it. When I open the file from the folder by
just
> double clicking on it and having it just open by default in the browser
the
> images don't show up. I just get the 'x' like an image should be there.
> Normally this would indicate that the path is wrong, except if you open up
DW
> and look at the page and then click F12 to view it in the browser it looks
fine.
>
> Further I had created this site before and everything worked fine. I
only
> recreated because it was cleaner then trying to fix up my old design.
>
> Either way the effect is weird. Any ideas of where I can look for the
problem
> in my code. I have looked at everything and nothing seems to jump out.
Any
> assistance would be appreciated.
>
| |
| Fortune Hunter Z 2004-04-30, 5:33 pm |
| Alan:
To answer your question about my term "peeling", yes I am doing it through the
DWX interface, i.e. selecting file, new, template. Then I paste my content in
and save it as the page name I need.
Here is the URL to get to the home page.
[L=Home Page Link]http://www.michaeltemple.com/New_Horizons/index.htm[/L]
However as you look at the code please notice the following lines of code...
<link href="../Main_Style.css" rel="stylesheet" type="text/css">
<body
onLoad="MM_preloadImages('../Images/Menu%20Down/Menu-Down_r1_c1.gif','../Images/
Menu%20Down/Menu-Down_r1_c2.gif','../Images/Menu%20Down/Menu-Down_r1_c3.gif','..
/Images/Menu%20Down/Menu-Down_r1_c4.gif','../Images/Menu%20Down/Menu-Down_r1_c5.
gif','../Images/Menu%20Down/Menu-Down_r1_c6.gif','../Images/Menu%20Down/Menu-Dow
n_r1_c7.gif')">
<img src="../Images/new%20horizons%20logo.jpg"
In all the cases above I added the ../ to the code according to some responses
I had received on another board. DWX did not create the code like this. I
went in and physcially changed it to try to get it to work. In either case it
did not work before or after I did this.
Second please note that my style sheet is not longer working either. The
style sheet is in the root folder and you can see by the code above it should
be using the relative path to find it, but for some reason is not.
Any help you guys can give me on sorting this out would be greatly
appreciated. Thanks
Fortune Hunter Z
| |
| Murray *TMM* 2004-04-30, 5:33 pm |
| Advice on another board? Yikes.
Do this -
FILE | New > Templates > Site > template name > Create
and then copy and paste the code from the head of the untitled document into
a reply to this post.
--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver MX
(If you *MUST* email me, don't LAUGH when you do so!)
==================
news://forums.macromedia.com/macromedia.dreamweaver - THE BEST WAY TO GET
ANSWERS
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================
"Fortune Hunter Z" <webforumsuser@macromedia.com> wrote in message
news:c6u9l1$l2i$1@forums.macromedia.com...
> Alan:
>
> To answer your question about my term "peeling", yes I am doing it
through the
> DWX interface, i.e. selecting file, new, template. Then I paste my
content in
> and save it as the page name I need.
>
> Here is the URL to get to the home page.
>
> [L=Home Page Link]http://www.michaeltemple.com/New_Horizons/index.htm[/L]
>
> However as you look at the code please notice the following lines of
code...
>
> <link href="../Main_Style.css" rel="stylesheet" type="text/css">
>
> <body
>
onLoad="MM_preloadImages('../Images/Menu%20Down/Menu-Down_r1_c1.gif','../Ima
ges/
>
Menu%20Down/Menu-Down_r1_c2.gif','../Images/Menu%20Down/Menu-Down_r1_c3.gif'
,'..
>
/Images/Menu%20Down/Menu-Down_r1_c4.gif','../Images/Menu%20Down/Menu-Down_r1
_c5.
>
gif','../Images/Menu%20Down/Menu-Down_r1_c6.gif','../Images/Menu%20Down/Menu
-Dow
> n_r1_c7.gif')">
>
> <img src="../Images/new%20horizons%20logo.jpg"
>
> In all the cases above I added the ../ to the code according to some
responses
> I had received on another board. DWX did not create the code like this.
I
> went in and physcially changed it to try to get it to work. In either
case it
> did not work before or after I did this.
>
> Second please note that my style sheet is not longer working either. The
> style sheet is in the root folder and you can see by the code above it
should
> be using the relative path to find it, but for some reason is not.
>
> Any help you guys can give me on sorting this out would be greatly
> appreciated. Thanks
>
> Fortune Hunter Z
>
| |
|
| this template-
http://www.michaeltemple.com/New_Ho...es/Template.dwt
most of the images and links use SITE root relative paths. That won't work-
you are hosted in a subfolder. Or- more aptly, this site is defined to a
subfolder.
info is below.
also- you shouldn't have to, or want to, adjust paths by hand by adding ../
or anything to them. Get the images working in the template, and they'll be
fine.
also- you should consider using a file and folder naming convention that
avoids problems. blank spaces and mixed case can cause problems.
suggest using only a-->z and 0-->9 and the underscore. No blanks spaces.
older info:
canned letter #7
it's because you are using Site Root relative paths {they always start with
a leading / slash }, and then either trying to directly view the files from
your hard drive, or you are hosted in a subfolder of a domain like
http://myhost.com/~mysite/
Site Root relative paths won't work in those cases- in the first case
because site root is different than drive root, in the later because the
domain is the site root, not your subfolder.
/image.gif is telling the browser the image is at
http://myhost.com/image.gif
but it's really here:
http://myhost.com/~mysite/image.gif
If that's the reason- change to Document Relative paths.
The point to file and Insert image uses the Last linking method you have
chosen.
******To change this********
select an existing image or link on the page.
in the Property inspector, click the folder icon, to open the "Browse to
File" dialog box. On the lower part of that dialog box is pulldown, to
choose "Site Root Relative" or "Relative to Document"
Put it on "Relative to Document"
Finish picking the correct file, and click okay.
That setting will now stay that way until it's changed.
When you use the point to file tool, it will use that method of linking.
If you want to quickly change links to a different linking method- install
the Relativity Extension.
http://e7x.com/dw/ Relativity ext.
or here
http://www.microwaved.plus.com/dw/
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|