Forum Moderators: phranque

Message Too Old, No Replies

Trouble with HTML code.

Something is wrong with the code in my index.htm file

         

jennshaggy

4:55 am on Nov 8, 2007 (gmt 0)

10+ Year Member



Hey...I'm really confused on what I'm doing incorrectly.
If you go to the site I'm trying to design, for some reason, when I upload the index.htm file to my hosting companies file manager, it just displays the html code when i go to the domain.

There must be some error in my script, but i can't figure out what it is. I used nearly an identical script on another page, and it worked just fine.

Any help anyone can offer would be greatly appreciated.

Thanks!

[edited by: tedster at 5:34 am (utc) on Nov. 8, 2007]
[edit reason] remove specifics [/edit]

daveVk

6:09 am on Nov 8, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Make sure all files refered to in index.htm are also uploaded, including images and particular .js files.

phranque

7:11 am on Nov 8, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



welcome to WebmasterWorld, jennshaggy!

take a look at your http response headers and make sure you have the following among them:

Content-Type: text/html

if not, your script should print that out or the server should provide that header with the response in some other way.

webtress

3:06 pm on Nov 8, 2007 (gmt 0)

10+ Year Member



Provided you have checked that the code is correct and not missing a opening bracket. Your hosting companines File manager could be the issue, try uploading the file using a ftp program there are many available.

Timoluege

3:13 pm on Nov 8, 2007 (gmt 0)

10+ Year Member



Does the beginning of the code of your index file look like this?


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

If not - it probably should.

Timo

jennshaggy

4:19 pm on Nov 8, 2007 (gmt 0)

10+ Year Member



i tried adding the script you guys suggested, but when i go to my site, i still see my html script and not the website.

[edited by: encyclo at 1:38 am (utc) on Nov. 9, 2007]
[edit reason] no links to personal sites please [/edit]

walrus

5:18 pm on Nov 8, 2007 (gmt 0)

10+ Year Member



You are seeing the website.
Try changing the background color to blue, sticking an image in any one of the <p class=MsoNormal> and you will see you are getting what you wrote, it works.
Not sure why you want to recreate the head and meta data in the body but thats why it looks like html. Also, you can't split java into separate cells. GL

piznac

6:05 pm on Nov 12, 2007 (gmt 0)

10+ Year Member



Does your file have the correct extension? (.htm,.html,.php,.asp etc)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

This is not 100% needed. Yes it is good structure but honestly only if you want xhtml transitional. You would want to determine what your page is a label it accordingly.

Sounds to me like it's being read as text therefore displaying the code.

phranque

6:44 am on Nov 13, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



i just noticed that here on WebmasterWorld there is a tool to check HTTP response headers [webmasterworld.com].

i usually use lwp-request for this but i thought others may benefit...