From: Chris Beall said:
dorayme,
OK, I think I'm getting closer. Let me repeat what I think you said and
see if I got it right.
Let's take the simplest case possible: I want to create a new web page
from scratch. ...
I open Simpletext and create a New file. I type in my HTML. I Save the
file, naming it xxx.html.
Yes.
At this point, although I've NAMED the file xxx.html, it is still just
TEXT to the Mac OS. Unlike Windows, which associates file extensions
with an executable program, Mac has a separate function to do this.
Simpletext itself does not contain the logic to do this, i.e. I can't
say Save As HTML from within Simpletext.
Pretty well. The text file is a text file and it will open as
text in any text program according to the "under the bonnet"
Creator and File Type 4 digit names associated. with this file.
(Simpletext is "ttxt" for creator and "TEXT" for file type. If
you give it a browser creator and file type. If this is changed
to the BBEdit codes it will open in that text editor instead.
And, to home in on one of your main points of interest, if you
change it to "MSIE for creator and "TEXT" for type, then it will
open in IE as a website page (assuming the text is well formed
as HTML). The creator and file type tells the OS to open it in
IE. IE has built in intelligence to open it as a webpage (no
matter what the over file name is). Not Mozilla though! Mozilla
will open it as a text file - given the right creator and file
type codes - ok! You know, you see in the browser window the
actual text: <html> <head> blah blah.... But - and here is the
reason I said for your daughter to put .html on the end of the
name - Mozilla will open it as a webpage if it has .html
appended. This last is a peculiarity of the intelligence built
into some or all Mac Mozillas, it has little to do with Mac OS.
So, it is a good idea and does no harm to anything to append
..html to web text files.
There are further oddities and things to note. Where do I stop?
In IE one can call it anything, even an alias on the desktop
(shortcut) works, it will open it as a webpage. But not Mozilla!
Mozilla wants the extension.
Instead, I can either:
1. Drag and drop the file on the application that I want to associate
it with, in this case Safari.
2. Open the application I want to associate the file with, then, using
that application, do a File, Open and select the target file.
This will establish the association for THAT SPECIFIC FILE, but will NOT
define an association for all files with the same file extension (unlike
Windows).
Once I've established this association, I can then just click on this
file in the future and it will, by default, open in Safari.
Not really I am afraid. The creator codes and file types are
serious things in the Mac world. You can't simply change these
codes by using the files in some particular way.
I have described how to solidly change the program you want to
open any file with. You need for this a little app or a
facility. Typeshuffler is good, Norton's and other programs have
various facilities, ResEdit can do it. But read on...
I have recommended your daughter forget all this. Don't bother.
Leave text files as text files. Keep them in a folder along with
all the website associated folders like images for the site. You
would not normally want to change a file.jpg file to be an IE
file (though you can and it /will/ then open in IE). No, leave
..jpgs as they are and .html as they are (jpgs may be openeable
in QuickTime if that is what the creator code is set at) and
..html text files (openeable in Simpletext). If the jpgs and html
files (as links) are referenced in the text files, they will
work in the browser as you expect.
I know it is hard to grasp for Windows folk. If you do really
"associate" - by way of creator code and type "under the
bonnet" changes - text files with browsers apps, you then will
/lose/ the easy access to the text files! Where will they be
found? You can open the webpage and open the source in View
Source etc but then you need to be able to change the text and
there /may/ be ways of setting things to do this. But it is not
how I work or a lot of Mac people work. Don't worry about
associations so that "next time" it will open in a browser. It
is dead easy to drop the file.html over a browser icon or window
everytime you open your website. You don't have to do this more
than once per session. All the other html pages on the site will
be linked from within the browser and be found automatically,
just as they are when accessing text files on a server. My
websites on various servers look like this: index.html,
main.css, file.jpg, etc etc - (and logically ordered in folders
which are reflected in the paths written into the links in the
text files ) This is what is on my machine, and it is what is on
the server. All just text files and jpgs... plain and simple.
When accessing the website via a url (also, by the way, possible
off line to one's own files), the browser has the intelligence:
it looks for the file mentioned or else for something called
index.html and away you go...