Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > HTML > BOOK: Beginning HTML, XHTML, CSS, and JavaScript
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning HTML, XHTML, CSS, and JavaScript
This is the forum to discuss the Wrox book Beginning HTML, XHTML, CSS, and JavaScript by Jon Duckett; ISBN: 978-0-470-54070-1
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning HTML, XHTML, CSS, and JavaScript section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 22nd, 2010, 02:01 AM
Registered User
 
Join Date: Feb 2010
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Big problem discovered at page 58 "Creating Simple Links"

Yes Hello:

I have a situation that perhaps someone could help me out on.

BTW:I am working on a Mac Book Pro with Mac OS X 10.5.8. I am using TextEdit.app to do my markups in code. I have just started chapter 2.

Throughout Chapter 1, the author asks everyone while creating the Restaurant example file pages to save all work files as a .html extension file. Well, I have done as instructed and did so without thinking.

I discovered on page 58 when asked to open one of the files created, namely, "contact.html" that I can open it but cannot edit the file. Since it opens in Safari I can view it as brouser text or in html markup. But cannot edit it.

So... when I got to Chapter 2 pages 58 and 59 I discovered that all my lessons which I saved as a .html files can be opened but not edited. When opened in my TextEdit.app the files can be opened and can be edited, but the markup code is gone, since I was instructed to save them as .html files instead of both editable .txt and the .html file format.

It appears, I should of saved them first as an "edit" .txt file with another name, then went ahead and saved them as instructed as a html file so I see how they will appear on a brouser.

Is this correct?

But i did not read ahead in the book and did not think of this. If it is mentioned by the author in chapter one to do this I have failed completely in finding this. If it is not I think it should have been brought to our attention to do this.

Now am I doing something wrong here? if anyone, has any suggestions as to how to correct this I am here. Otherwise, it appears that I will have to go back and redo all of chapter one's entire lessons and pages, then save the files as both .txt and .html.

BTW, what is the purpose of saving files in the html extension if you are not done with the work. It appears from my porch that you can't add or correct anything with that file extension once created. Perhaps this should be done once the file is completed in txt ?

Thanks in Advance.

Antares
Reply With Quote
  #2 (permalink)  
Old February 22nd, 2010, 05:36 PM
jminatel's Avatar
Wrox Staff
Points: 18,940, Level: 59
Points: 18,940, Level: 59 Points: 18,940, Level: 59 Points: 18,940, Level: 59
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: May 2003
Location: Indianapolis, IN, USA.
Posts: 1,945
Thanks: 73
Thanked 139 Times in 101 Posts
Default

Antares: This will work differently for each different user depending on their operating system. What you'll need to do on your Mac is either:
  • Start TextEdit and then open the file from TextEdit or
  • "Right click" [Cntl Click] on the file and choose TextEdit from the list of programs to open the file with
__________________
Jim Minatel
Associate Publisher, WROX - A Wiley Brand
Did someone here help you? Click on their post!
Reply With Quote
  #3 (permalink)  
Old February 22nd, 2010, 10:34 PM
Registered User
 
Join Date: Feb 2010
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the reply Jim.

However, getting to or from TextEdit is not the problem nor is saving. The problem is most likely an inert feature of the MAC OX operating system in dealing with .html files.

Today I discovered once an .html extension is created in TextEdit the file goes by nature of it's extension ie. .html, to safari app. in Finder of MAC OX.

When you go to finder the file, (then one you just saved in TextEdit) will be there. When you open it you have just 2 non edit mode options. You can view the file in Text or in Plain Text. In the plain text you have the code but you cannot edit it. In the other view mode the text is as you would see it in a browser window.

So.. I found by highlighting in the plain text code mode I can copy this, then flip on the TextEdit program, select File, then "New", then select "plain text" option, then Go to Edit, click paste and then I will now have the coded markup text in TextEdit and it is editable.

If you do not do this, and when you first save your page code in TextEdit and close it after saving the file as an .html extension, when you reopen TextEdit and that file you will get text but all your markup code will be gone.

I suppose this is what these Web Editing Programs went and created. A way to not have to do all this switching and pasting. They use WYSIWYG with split screens on the page your working on. That way as you write the code markup language you can also see is presented in the top window as it will appear on a browser screen without all the switching back and forth that I currently have to do. I would expect that they also have some convenient way to say "Editable" XHTMlL Code Markup Text so the editor overrides things to make the creative process less painful.

Antares
Reply With Quote
  #4 (permalink)  
Old February 22nd, 2010, 10:39 PM
Registered User
 
Join Date: Feb 2010
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the reply Jim.

However, getting to or from TextEdit is not the problem nor is saving. The problem is most likely an inert feature of the MAC OX operating system in dealing with .html files.

Today I discovered once an .html extension is created in TextEdit the file goes by nature of it's extension ie. .html, to safari app. in Finder of MAC OX.

When you go to finder the file, (then one you just saved in TextEdit) will be there. When you open it you have just 2 non edit mode options. You can view the file in Text or in Plain Text. In the plain text you have the code but you cannot edit it. In the other view mode the text is as you would see it in a browser window.

So.. I found by highlighting in the plain text code mode I can copy this, then flip on the TextEdit program, select File, then "New", then select "plain text" option, then Go to Edit, click paste and then I will now have the coded markup text in TextEdit and it is editable.

If you do not do this, and when you first save your page code in TextEdit and close it after saving the file as an .html extension, when you reopen TextEdit and that file you will get text but all your markup code will be gone.

I suppose this is what these Web Editing Programs went and created. A way to not have to do all this switching and pasting. They use WYSIWYG with split screens on the page your working on. That way as you write the code markup language you can also see is presented in the top window as it will appear on a browser screen without all the switching back and forth that I currently have to do. I would expect that they also have some convenient way to SAVE the "Editable" XHTMlL Code Markup Text so the editor overrides things to make the creative process less painful.

Antares
Reply With Quote
  #5 (permalink)  
Old February 23rd, 2010, 04:06 AM
Registered User
 
Join Date: Feb 2010
Posts: 5
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi, what happens if you go to the TextEdit menu, select preferences from the drop down, then on the 'open and save options' panel, check the box that says 'Ignore rich text commands in HTML files' - does that help you?
Reply With Quote
  #6 (permalink)  
Old February 23rd, 2010, 07:10 PM
Registered User
 
Join Date: Feb 2010
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes, Hello:

Well it would do the same as if you went directly up to "Format" then selcted
"Make rich text" . Except when create your markup in rich text and then you save a rich text document as .html it will not let you do that in TextEdit. You can however, save as a .html.rtf document.

It will save it in (my case) my parent file called: HTML Classes. But unlike the other inter-linkable .html files in this directory I have created, it will only open back up in the TextEdit app. not the Safai.app as the other ones do. It is an editable file like this though and I suppose one could continue to write and change or expand upon it. But if you want to write markup in it and you want this markup to interact with your other .html page/files under their common parent directory, it will not do that if saved using rich text.html.rtf. file format.

I am just getting into all of this piece by piece. I am surmising that this is what real Text Editor programs do. They give you instant visual access to the rendering of your XHTML code as you type it out. This visual change is how it would appear in a published Web document. I further assume that the code input window is savable as is.

Since I do not have the instant "what you see is what you get" capabilities, I need to switch back and forth to see what my coded markup will look like in a browser, thus the necessity of saving my TextEdit work as .html.

Any way when I had posted this, I did not have this complete understanding of how it all works. Until I get an Editor Application I will work it this way since I have now found a way to render my code and recreate my original markup, I suppose I'm fine for now.

Thanks for all your advice and responding to my plea's!

Antares
Reply With Quote
  #7 (permalink)  
Old February 23rd, 2010, 07:25 PM
Registered User
 
Join Date: Feb 2010
Posts: 5
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi Antares,

Sorry if I am misunderstanding your problem, but I am running OSX 10.5.8 and have no problem using TextEdit as an editor.

When I go into TextEdit, and tell it to ignore rich text commands in HTML files, then I can save files with the .html extension, and open them in Safari / Firefox.

Then I can open that file again in TextEdit, make some changes, save the changes, and open it up again in Safari / Firefox. I do not need to change the names of the files.

I think that it is possible that your TextEdit is just opening HTML files as HTML because you have not checked this option.

Check out the settings on here:
http://homepage.mac.com/cjrtools/ebo...references.jpg

Or look at this page for more info:
http://homepage.mac.com/cjrtools/ebo...web-pages.html


Alternatively, there are a few free editors you can try out:
http://webdesign.about.com/od/macint...sh-editors.htm

Hope that helps - if not, give us a shout back (because you shouldn't have to save them as text files until you are finished editing them).
J
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Difficulties with "web.config" and "ASPNETDB" CFRham BOOK: ASP.NET MVC Website Programming Problem Design Solution ISBN: 9780470410950 2 July 3rd, 2010 10:19 AM
How to theme the "Browse" button of "FileUpload" control? varunbwj BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 2 October 14th, 2009 01:22 AM
Add a CheckBox DataColumn to my DataGridView, Null format: "" or "True" but Error: F ismailc C# 2005 0 September 25th, 2009 04:56 AM
Code not going as planned: "icicle" vs "savedinstancestate" joopthecat BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 3 May 3rd, 2009 03:09 PM
Chapter 29, The "Simple" Exercise slginps BOOK: Professional Visual Basic 2008 ISBN: 978-0-470-19136-1 1 April 25th, 2009 01:40 PM



All times are GMT -4. The time now is 07:18 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.