Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Page shows code instead of formatted text and images 130111

Posted on 2013-01-11
4
Medium Priority
?
450 Views
Last Modified: 2013-01-15
Hello expert,

Created an html page to help sell my house.
http://www.allenpitts.com/7147/7147_Flyer.html

Got several calls from prospective buyers saying:
'The page display as html code.'
When I tested at my computer (IE 9) it works fine.
But using Firefox it displays code and so also on the
iPhone.

I tried using HTM in instead of html and removed

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

No luck, I surmise that the browser, when it display code,  
thinks the file is text instead of html code but not sure how
to get it to display.

Allen in Dallas
0
Comment
Question by:Allen Pitts
  • 2
4 Comments
 
LVL 10

Expert Comment

by:stu215
ID: 38768692
I just tried in Firefox v17.0.1 & IE 9 and it works fine... It does not work in Safari v5.1.2 though.

The markup all seems correct.

What kind of server are you hosting this file on? or do you use a hosting company?
-- I've seen something similar where I had a client trying to host his website on a NAS device.

Assuming it is on a NAS device and not an actual webserver:
They make files accessible on the web but are not true webservers and do not interpret the HTML as html... The reason it would work in some browsers is because some newer browsers are smart enough to do the interpretation themselves.
0
 
LVL 10

Expert Comment

by:stu215
ID: 38768713
Had another thought that you may be correct if you did it on a windows machine in notepad and then made the extension .html it wouldnt have really changed the extension and may be interpreted as text like you think.

To check on a win 7 machine:

Go to Start Menu -> Control Panels -> Folder Options -> "View" tab

and then UNcheck "hide extensions for known file types"

This will then show the full extension on the file and you should be able to modify it to just:
fileName.html
0
 
LVL 13

Accepted Solution

by:
Ugo Mena earned 1500 total points
ID: 38768825
no character encoding or parsing mode is detected.

The pragma directive should be used for pages written in HTML 4.01. It should also be used for XHTML 1.x documents served as HTML, since the HTML parser will not pick up encoding information from the XML declaration.

Use a pragma directive at the top of the head element.

<meta http-equiv="Content-type" content="text/html;charset=UTF-8">

Correct this and then you can double check yourself with the following HTML validator:

http://validator.w3.org
0
 

Author Closing Comment

by:Allen Pitts
ID: 38780509
Didn't work but the best answer I got
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever visit a website where you spotted a really cool looking Font, yet couldn't figure out which font family it belonged to, or how to get a copy of it for your own use? This article explains the process of doing exactly that, as well as showing how…
When you put your credit card number into a website for an online transaction, surely you know to look for signs of a secure website such as the padlock icon in the web browser or the green address bar.  This is one way to protect yourself from oth…
Shows how to create a shortcut to site-search Experts Exchange using Google in the Chrome browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch the Search Engine Menu: In chrome, via you…
How to create a custom search shortcut to site-search Experts Exchange using Google in the Firefox browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch your Bookmark Menu: Press 'Ctrl +…
Suggested Courses

876 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question