PDA

View Full Version : View in browser issues


Knight58
03-10-2011, 12:04 PM
I published my site @ 5 days ago with no problems. I went back in to make changes, but I cannot preview in browser. When I click preview in browser; the first page is fine but when I click on another page tab the path changes as below:

C:\Users\User\Desktop\1-800poems.com\TMPsojtohue4l.htm

C:\Users\User\Desktop\1-800poems.com\anniversary.html

C:\anniversary.html

The first is not one of my paths but it is what appears in the first window I pull up.

The second is one of mine and is correct.

The third is what happens after I click on another page and try to go back to the the same page.

gentleone
03-10-2011, 01:30 PM
It looks like you didn't define your site first in DW, before you started building it.

Corrosive
03-10-2011, 01:44 PM
Here is a guide; http://www.dreamweaverclub.com/define-your-site.php

Knight58
03-10-2011, 01:51 PM
my site is 1800poems(dot)com. I define it and published it and had the ability to view in browser with no problem for weeks while building site.

Should I attempt to go into manage sites and re-define it?

Corrosive
03-10-2011, 02:07 PM
That's the only thing I can think of but, saying that, as you rightly pointed out the live site works fine and you have published it OK. Must admit am a bit confused!

Knight58
03-10-2011, 03:04 PM
I have gone in and re-defined site and still have the same problem. I think the problem starts with the path:
C:\Users\User\Desktop\1-800poems.com\TMPsojtohue4l.htm

This is different for each page, but none are my correct paths. When I hoover, it does show the correct path, however when I click that path changes to C:\Users\User\Desktop\1-800poems.com\forher.html which is correct, but I get a:
Internet Explorer cannot display the webpage

DWcourse
03-10-2011, 03:26 PM
You should be aware that preview in browser really only works for the page you are previewing from Dreamweaver. You can't count on links from that page to other pages working properly. In general they will work if all of your links are relative to the document (in other words ../image/image.jpg, images/images.jpg or image.jpg). They won't work on pages you link to if you links are site relative Iinother words start with a slash "/" link /ndex.html).

You can set whether you links are site or document relative in the site setup or on a case by case basis when you create the link.

Knight58
03-10-2011, 03:39 PM
Thanks for the assistance; I really appreciate the input. I guesss my concern is that if I have something in my template or mock-up that is corrupt; I do not want to upload that corrupt file to my live site that is working well. Do you think this will be an issue?

Knight58
03-10-2011, 03:52 PM
Does it mean anything that my slashes are all \ instead of / in the paths.

C:\Users\User\Desktop\1-800poems.com\TMP1ghgqhupi2.htm

Corrosive
03-10-2011, 04:01 PM
Does it mean anything that my slashes are all \ instead of / in the paths.

C:\Users\User\Desktop\1-800poems.com\TMP1ghgqhupi2.htm

Yep, and I don't like the look of; TMP1 in there either. Probably stands for temporary! What happens if you just click on the home page in the root folder itself and don't use DW Preview?

Knight58
03-10-2011, 04:09 PM
Damn! I get a very basic page with no CSS at all, no images or anything except skelital page. Glad you asked.

DWcourse
03-10-2011, 04:12 PM
The TMP indicates it is a temporary file. Which means the use temporary file for preview option is checked in DW's preferences. It's nothing to worry about. If you use site relative links you need it for the paths to resolve correctly in Preview. The \ rather than / is a Windows thing. Again, it shouldn't be an issue.

To ease your mind, in Dreamweaver open up a couple of the files that you had bad previews for and preview them directly (not through a link from another previewed file). Everything should be OK and then I'd say you're ok to upload.

And, of course, you can always make a backup of the site first.

Corrosive
03-10-2011, 04:13 PM
The TMP indicates it is a temporary file. Which means the use temporary file for preview option is checked in DW's preferences. It's nothing to worry about. If you use site relative links you need it for the paths to resolve correctly in Preview. The \ rather than / is a Windows thing. Again, it shouldn't be an issue.

To ease your mind, in Dreamweaver open up a couple of the files that you had bad previews for and preview them directly (not through a link from another previewed file). Everything should be OK and then I'd say you're ok to upload.

And, of course, you can always make a backup of the site first.

Beat me to it. Listen to Jim, he knows DW like the back of his hand!

DWcourse
03-10-2011, 04:20 PM
Damn! I get a very basic page with no CSS at all, no images or anything except skelital page. Glad you asked.

No, that's not a problem because (apparently) your links are relative to the root of your site. That means, on your server, a link to /index.html goes to your home page. On your computer, the C drive is considered the root. So a link to /index.html would go to C:\index.html. So all your links are (including links to images and CSS files) are going to appear broken when you just open a file from your site directly in a browser. (That's why Dreamweaver is using a temporary file when it previews).

Again, I don't think you have a problem. Why not make a copy of an existing file and rename it (don't update the files when you do) then upload that file and see it looks OK. If it doesn't work, then post the link here.

DWcourse
03-10-2011, 04:22 PM
To clarify: A page SHOULD preview correctly when you click Preview in Browser from Dreamweaver. If you then click on a link in the previewed file in the browser it may not work depending upon the type of links (relative to document or site root) you used.