Index.htm comes up as TMPxxxxxxxx.htm when testing in browser

GeoffO
GeoffO used Ask the Experts™
on
I am updating our website for the second time (first two worked fine).  Now when testing the site from Index.htm I press F12 and up comes TMPxxxxxxxx.htm.  From there the links don’t work (“The page can not be displayed”).

If I change TMPxxxxxxx.htm to Index.htm and press go, then click (for example) the Mission button, up comes Index.htm again.  If I change that to the required link, Mission.htm, then I can get into Mission and the home button on that page will successfully take me back to the true Index.htm.

The site has been set up with Index.htm as the Home Page, and all needed files are shown.  Site map only shows five of the seven possible links from Index.htm.

Have been advised to use document-relative links (eg my Link is in this case simply Mission.htm).

Why does Dreamweaver4 change Index.htm to TMPxxxxxxx.htm and how can I prevent it and get the site to work properly?

I have the Dreamweaver manual, Dreamweaver Bible and Teach Yourself Visually Dreamweaver4.  Any recommendations are welcomed for really well thought-out books where the author(s) have put themselves in the position of a floundering novice user.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
What youre doing is previewing the page. It uses a temp file for the preview. You can turn that option off in Dreamweaver MX via the preferences.

Author

Commented:
Thanks, but I don’t have MX.  I am using Dreamweaver4 (in Win XP Pro).

Author

Commented:
PS  Have just noticed that pressing the Mission button does not take us to C:\Website6\Mission.htm (as clearly indicated in the Properties Inspector) but to C:\Website6\Button18.swf\Mission.htm which, of course, is a non-existent location.

GeoffO
Amazon Web Services

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

Commented:
Geoff, i'm pretty sure weed is correct, but I'm not sure if it's possible to disable in Dreamweaver 4.  The thing is your just using the preview so it creates a Temp file to view instead of using the direct location of the file you want to view.  Probably security reasons behind it.  When you go to your folders and view the C:\Website6\Index.htm file everything is working correctly ... right?  If not then i'm not sure what's wrong.  

Author

Commented:
DrSpinT,

It seems strange to me that TMPxxxxxxx.htm should be substituted deliberately for Index.htm without the user asking for it (or having no option in Dreamweaver4 but to accept it).  I don’t recall this happening in the two previously successful versions: if I tested Index.htm, I got Index.htm in the IE browser.

Wouldn’t anything set to return to the intended home page (Index.htm) also be confused by the change of address?

I don’t understand what you mean by “When you go to your folders and view the C:\Website6\Index.htm file everything is working correctly ... right?”.  

In a static situation everything looks well enough, but when checked dynamically, ie when viewed in the browser to see if it is working, the whole site falls flat on its face.

GeoffO

Commented:
When you're previewing the page, it's NOT 'checked dynamically' -- you're not viewing the SAVED document, but one in progress. The temp file is NOT saved until you explicitly save it.

Have you defined the site? If you haven't done that, all your links WILL be wrong -- because the computer has to use the ABSOLUTE address of the file, which is its location on YOUR computer, as opposed to the RELATIVE location of the file, which is where the link is relative to the location of the page the link is on.

Have you used Flash buttons? If you have, that would account for the .swf reference in the link.

Remember, you must replicate your directory structure ON THE SERVER or no links will work correctly.

Define the site, save the files, and THEN test them -- using the browser (open browser, use FILE/OPEN), NOT using preview.

Author

Commented:
Hello webwoman,

By ‘dynamically’ I mean testing the site to see the links in action, rather than just looking at it passively.  It is my intention to preview the currently saved document, not the previous one, and I have always saved before previewing for that very reason.

Is there, perhaps, a Save Site command lurking somewhere in addition to the ordinary Save command for individual pages?

Yes, I have defined the site and the home page (as mentioned in the third paragraph of my question).  The only odd thing about it is that the site map does not show all the links, and Check Links doesn’t show any broken ones (though it does show some orphaned links – which refer to previous attempts in other directories – but which are not present in this incarnation of the site, nor in the current site directory).

What I do not understand – and no-one has answered the question yet – is why, when I click F12, Dreamweaver doesn’t put up the home page (Index.htm) but, in the present case TMP5h765s8c5.htm.  What relation does that have to anything?  It resembles Index.htm but doesnt’t respond to any of the buttons.  Mysteriously (to me, but maybe not to you) it does respond properly to a rollover.  Perhaps there is a clue there?  Are the Flash buttons the problem?

I have used Flash buttons by force of circumstance and because that is what Dreamweaver told me to do.  What other way is there of putting in buttons apart from drawing them and putting them into a table (which I am perfectly happy to do if necessary)?

I do not understand your comment about ‘replicating my directory structure ON THE SERVER’.  What server?  Please remember I am a novice at this game.  All I want to do is try the thing out in Dreamweaver4 before passing it on to someone else to FTP it on to the ISP (if that is the correct description of what happens).

Prior to the current problem I was able able to test the whole site dynamically (ie to see if it worked in action within Dreamweaver) and everything was hunky dory.  But it ain’t any more!

Please stick with this one: I am sure you have the answer if only we could stick to really simple terminology.

Regards,

GeoffO
I know what you mean GeoffO, this is a highly annoying nuance of Dreamweaver. The simple way I've found to overcome this problem, and the way i've worked for years (maybe i'm wrong or it's not the most efficient way, but it works for me), is to simply save the html file you are working on, and actually have the file, for example, index.html, open in an explorer window and simply refresh every time you save.  This way, it's actually the proper file you are looking at and as long as you've referenced the files properly, they will work.

Hope it helps.
GeoffO
The tmpxxxx.htm file is a temporary file.  As webwoman described this is a file 'in progress' and not the saved file.  The reason this hapens is:
 
You save the file and then one microsecond after this the document *may* have changed.  In your case the file has not changed, but dreamweaver assumes you want the latest possible version of the page when you hit F12.  The latest possible version is actually the one that is in the dreamweaver window and not the one on you have saved.

So in effect the tmpxxx.html page that you are viewing is <b>exactly</b> the same as the saved version.

If you feel uncomfortable with this try previewing from the site window - click the index.html file in the site window and hit F12.  This will show you "C:/website6/index.html" in your address bar.

Broken Links
As for broken links you really need to use 'page relative' links.  It sounds like you are using 'site root relative' links. Root relative links 'look' perfectly fine in Dreamweaver but as soon as you view it in a browser they go spastic.   When you assign a link at the bottom of the pop up is an option 'Relative to'.  You need to change this from "Site Root" to "Document".  This should solve the broken link problem.

Flash Buttons
Are you using the flash buttons that ship with Dreamweaver.  If you are there seems to be a problem with them and i don't know why.  Anyway the fix is to have your links in the button point to: "../Mission.htm" (without the quotes)

I just tested the flash button with dreamweaver with the "../" style link and this still didn't work.  Only other option is to use absolute URLs - yourwebsite.com/mission.htm

Author

Commented:
geoffFord,

Thanks for your clear and simple plain English explanation of the use of TMPxxxxxxx.htm.  It seems to me that Dreamweaver 4 has got its undergarments in a twist, because I started the revision of our site using absolute links – and it wasn’t happy with those either!  I have removed and re-installed Dreamweaver twice since then, and restarted in a new directory each time, in the hope that it might (a) start afresh and (b) let go of the orphaned files from a previous version.  Maybe it writes stuff to the Registry or some sort of hidden .INI file and doesn’t clear it out.

Have just discovered the Layout Table, which allows you to put images exactly where you want them (including the facility to Nudge up, down and sideways a pixel at a time with the Arrow Keys) without the need either for layers or Flash buttons (I have captured screen shots of each button in two colours and am putting them in as JPEG rollovers).  This is going to take a bit longer than ‘insert layer, insert Flash button’ but I am hoping it will be more secure, as well as being readable by the likes of Netscape, Mozilla, Opera etc.

Best regards,

GeoffO

Commented:
OK... let's go back to square one...it might clarify things.

First -- if you don't have CODE & DESIGN view on, TURN IT ON. It will help you ENORMOUSLY in figuring out what's happening.

SEcond -- DO NOT use any layers, Flash, interactive ANYTHING or ANY effects until you understand how the thing is getting constructed. I know it will make it harder to do cool stuff, but it will be a huge help because you'll be able to understand better why things don't work. Using all those effects is a great way to have things completely fall apart very easily, and since you don't really understand what you did in the first place, it's pretty much impossible to fix anything. It's not just you, most people tend to use all the fancy stuff and they have the same problems you're having. ;-)

Third -- DELETE any sites you have and redefine your site so the Dreamweaver cache gets rebuilt. This should help get rid of the strange stuff, but a lot of your links are going to break when you do this.

Fourth -- NEVER use absolute links unless it's a link to an outside site. Absolute links will completely break anytime anything moves, changes in any way, or you upload the site because they're tied to YOUR computer and your structure.

About directory structure -- if you have folders in your website for images, flash files, javascript, etc., you must have EXACTLY those same folders when you upload. The easiest way to do this is to just copy the entire contents of your root web folder to the webserver. Dreamweaver can do this provided the server supports FTP and you set it up.

The root folder for your web will be where you define it in the SITES window. Usually it's where you keep the index.html file, and it's the basic reference point for all relative links. Relative links are normally set as relative to the document they're in, but the BASE for that is your root folder -- the link can't go OUTSIDE that root folder, but it can go anywhere within or UNDER that root.

Does that help any? I know this stuff it totally unintuitive, which is why I recommend not using anything fancy until you get the basics down.

For fancy buttons, use a graphics program. Fireworks is my choice, but Photoshop or PaintShop Pro will work too. DON'T do any mouseovers, swaps, layers, etc. until you're more comfortable with setting up basic stuff. They involve a lot of scripting, and it's really easy to get messed up when you have a lot of goobledeegook code in the way. ;-)

Author

Commented:
Hi webwoman,

Thanks for coming back.  In view of the problems brought about by Flash buttons (including some browsers’ inability to read them) I have just drawn a whole set of new buttons in Corel Draw (where I am really at home!) and put them in as rollovers/mouseovers.  This was because the only thing that worked in the problematic version 3 of the site was a rollover (versions 1 & 2 were fine using Flash buttons, that was what was so frustrating).

Everything now works, at least locally (F12).  And I am waiting for instructions from our hosting person about how to upload and actually see it live.

I still don’t understand why Flash buttons should be so troublesome.  On the face of it the steps in design view are (1) draw layer, (2) call up pretty button, give it a name and tell it where it should be pointing.

Must say I am very disappointed with Dreamweaver4, especially as it was on PC Pro’s A List before being displaced by MX (which, presumably, is now even trickier to handle)!

On the subject of cool stuff, I’m into old-fashioned cool: just give them what they need, with plenty of space, as elegantly as possible.  Don’t distract everyone with fireworks (with or without a capital F)!

Best regards,

GeoffO
Commented:
>>On the subject of cool stuff, I’m into old-fashioned cool: just give them what they need, with plenty of space, as elegantly as possible.  Don’t distract everyone with fireworks (with or without a capital F)!

On this, I completely agree. ;-)

If you're comfortable with CorelDraw, use it. I use Fireworks because I've been using it since the public beta, and I'm really comfortable with it. There are multiple tools for graphics, so there's no reason to switch unless it's going to give you some advantage that what you already have doesn't (or you can get it for free/cheap and you want to learn something new!) There is a demo for Fireworks, so if you want to see how that compares to CorelDraw, you can do so without putting out any cash. But it's certainly not necessary.

The effects in Dreamweaver are something I wish they would have just left off. They cause no end of problems for beginners, and those who are experienced enough to modify them to suit their needs usually have the skills to create their own in the first place. I know it can be a timesaver for some people, but without the knowledge of what it does and how it works, it just makes people frustrated and feel dumb, when it's not them, it's the tool.

It's as if tool makers marketed a pipe wrench as something that would immediately turn you into a plumber, able to replace all the pipes in your house and install a new bathroom with no previous experience... ;-)  

Author

Commented:
webwoman and geoffFord,

(This may appear twice, as my first submission seems to have disappeared.)

Thanks for all your help.  The new handrawn buttons, put in via Layout Table (or Table Layout) used as rollovers and linked relative to the document, work well.  There isn’t a layer or a Flash button in sight, so Mozilla users can now see everything as well (that should bring in at least another three satisfied customers!).

I propose to split the points between you (100 each) if you are agreeable and can remind me how to do it?

Best regards,

GeoffO

Commented:
Have you tried, EDIT, PREFERENCES, then select PREVIEW IN BROWSER from the list down the side and make sure that PREVIEW USING TEMPLATE is UNCHECKED.

I hope this solves your problem, if not let me know and i will have another look for you.

Author

Commented:
Thanks, Matfink, I haven't got PREVIEW USING TEMPLATE on my version.  I think the problem was that I didn't have Netscape, Mozilla, Opera etc on board - only IE.

The problem has gone away since I stopped using Layers and Flash buttons (I think Macromedia should have made it more obvious to beginners that Flash can cause problems).

The question has now been answered jointly by webwoman and geoffFord and I am waiting for a reply to my suggestion that the points should be split between them.

Regards,
GeoffO

Commented:
Thats fine mate, I am just glad you have sorted it out.

Matt.
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Split: geoffFord {http:#7471893} & webwoman {http:#7474156}

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

zenlion420
EE Page Editor

Author

Commented:
zenlion,

I think that has fixed it.  (Just noticed the Split Points option!)

Regards,

GeoffO

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial