Welcome to WebmasterWorld Guest from 54.224.160.42

Forum Moderators: open

Message Too Old, No Replies

Syntax Error

IE6 Loads page, but with errors

     
8:53 pm on Jan 18, 2003 (gmt 0)

New User

10+ Year Member

joined:Jan 18, 2003
posts:13
votes: 0


My website

will load, but IE6 recognizes a syntax error and I can't find it. The first error it finds is line 2, character 1. What am I not seeing? I have checked and checked with html validators to no avail. Any other option to locate the error?

I am no html wizard, I am learning.

-Sue

[edited by: susanlprince at 9:00 pm (utc) on Jan. 18, 2003]

8:55 pm on Jan 18, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Apr 27, 2002
posts:1685
votes: 0


No posting of links kiddo :)

<added>Welcome to WebmasterWorld and don't forget to read the TOS.</added>

[edited by: pendanticist at 8:57 pm (utc) on Jan. 18, 2003]

8:56 pm on Jan 18, 2003 (gmt 0)

New User

10+ Year Member

joined:Jan 18, 2003
posts:13
votes: 0


oops...sorry...nevermind.
8:57 pm on Jan 18, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Apr 27, 2002
posts:1685
votes: 0


Go back and break the link before the mods do..
9:06 pm on Jan 18, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Apr 27, 2002
posts:1685
votes: 0


Try posting a snippet of the code in the lines you mentioned. Far as I know that's cool to do here.

Pendanticist.

9:11 pm on Jan 18, 2003 (gmt 0)

New User

10+ Year Member

joined:Jan 18, 2003
posts:13
votes: 0


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http

Error says Line 2 Character 1 but gives me no "error code"

9:29 pm on Jan 18, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Apr 27, 2002
posts:1685
votes: 0


According to Learn The Net:

Syntax is the order in which words and phrases are put together, such as a URL (web address) which consists of several phrases that are strung together to define a location or service on the Internet. A syntax error occurs when a user (or programmer) has put words in an order that a program does not understand. A syntax error while surfing the Web may be caused by a mistyped or inadvertently rearranged URL, making it incomprehensible to a web browser.

But I don't see all that much of a problem from what you've posted.

Sticky me the URL and I'll run it thru ARV and see if I can find anything.

Pendanticist.

4:04 am on Jan 19, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:May 26, 2000
posts:37301
votes: 0


Since line 2 character 1 seems to be the quotation marks, I'm wondering if you accidentally have "smart" quotes there.
4:16 am on Jan 19, 2003 (gmt 0)

New User

10+ Year Member

joined:Jan 18, 2003
posts:13
votes: 0


I do not know what "smart" quotes are?
4:20 am on Jan 19, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Apr 27, 2002
posts:1685
votes: 0


He's referring to that part where you had your url instead of the one you needed to have.
4:21 am on Jan 19, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:July 7, 2001
posts:661
votes: 0


susanlprince,

The error you describe is almost certainly a JavaScript error. What kind of JavaScript do you have on your page?

-Marty

4:37 am on Jan 19, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Apr 27, 2002
posts:1685
votes: 0


. What kind of JavaScript do you have on your page?

One of her problems was, for example: cellpadding=10 cellspacing=0 leaving out the "" where appropriate.

Pendanticist.

4:39 am on Jan 19, 2003 (gmt 0)

New User

10+ Year Member

joined:Jan 18, 2003
posts:13
votes: 0


Ummmmmmmmmmm...I have no idea! LOL

I am new to html and the javascript on the page probably comes from whatever scripts I've gotten from certain other sites. I no nothing of writing my own stuff.

<script type="text/javascript" src="archive.html"></script>
<script type="text/javascript"

Would that mean I have text javascript?

<script type="text/javascript" language="JavaScript">var site="s14susanlprince"</script>
<script type="text/javascript" language="JavaScript1.2" src="http://s14.sitemeter.com/js/counter.js?site=s14susanlprince">
</script>

Sorry, I am very ignorant!

-Sue

4:44 am on Jan 19, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:May 26, 2000
posts:37301
votes: 0


re "smart quotes"

Smart quotes are those "curly" quotes that word processors sometimes use - they curve in or curve out around the quoted words, rather than going straight up and down. Depending on the application used to write or copy/paste code, I've seen people end up with smart quotes in their document.

Smart quotes may look OK on the screen, but down at the programming level they're a totally different character entity, and not OK at all.

4:49 am on Jan 19, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:July 7, 2001
posts:661
votes: 0


Yes, your page is using JavaScript.

The error is probably caused by one of the "free" scripts.

My website will load, but IE6 recognizes a syntax error and I can't find it

The ONLY syntax errors that IE6 reports are scripting errors.

4:50 am on Jan 19, 2003 (gmt 0)

New User

10+ Year Member

joined:Jan 18, 2003
posts:13
votes: 0


Ahhhhhhh, OK I understand smart quotes then. Well, you see, most of the html from the page isn't from me...it's from copy and paste. Learning as I go and what I am learning is the people who write html aren't necessarily "experts" or very meticulous.

-Sue

4:57 am on Jan 19, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:May 26, 2000
posts:37301
votes: 0


So, line 2 and character 1 probably refers to an external javascript file - you got one of those?
5:03 am on Jan 19, 2003 (gmt 0)

New User

10+ Year Member

joined:Jan 18, 2003
posts:13
votes: 0


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
"http://www.w3.org/TR/REC-html40/loose.dtd">

That's my line 1 and 2.

The external javascript is from blogger archive, Haloscan commenting and probably a couple of other things. I just don't see anything in Line 1 or 2.

5:25 am on Jan 19, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:July 7, 2001
posts:661
votes: 0


So, line 2 and character 1 probably refers to an external javascript file - you got one of those?

tedster, I think that's what's happening. She has at least one external script, see message #13 above.

5:32 am on Jan 19, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:May 26, 2000
posts:37301
votes: 0


I just noticed this line:

<script type="text/javascript" src="archive.html"></script>

The file name archive.html may be causing parsing problems. External javascript files should have an extension of .js, not .html

That being said, it's lines 1 and 2 of THAT file where Explorer is saying you have a syntax problem, not your principle HTML file.

5:36 am on Jan 19, 2003 (gmt 0)

New User

10+ Year Member

joined:Jan 18, 2003
posts:13
votes: 0


That archive file links to an archive page. it is called /Archive.html

How is that gonna work? do I rename the page too? Everything works all fine and dandy now. Should I mess with it?

5:45 am on Jan 19, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:May 26, 2000
posts:37301
votes: 0


That all depends. What change made the syntax error stop appearing?
1:43 pm on Jan 19, 2003 (gmt 0)

New User

10+ Year Member

joined:Jan 18, 2003
posts:13
votes: 0


Nothing made the syntax error stop, except a refresh. the page loads fine, it is just that on the toolbar in the brower it reads "Done but with errors". When I click on it that is where I see the error. When I refresh, the page loads and no error detected. I was asking that since everything seems to load fine, even with an error detected, should I bother to mess with it?
11:03 pm on Jan 19, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:July 7, 2001
posts:661
votes: 0


Some JavaScript program that you have on your page is not working as intended.

With that in mind, maybe you should remove the program that is causing the error, since it is not working anyway.

If you want, sticky mail me the URL, and latter this afternoon, I'll find out which one is at fault.

11:56 am on Jan 20, 2003 (gmt 0)

Full Member

10+ Year Member

joined:Dec 13, 2002
posts:307
votes: 0


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
"http://www.w3.org/TR/REC-html40/loose.dtd">

I think this should be:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

This latter doesn't close the tag too early, as the former appears to, the browser is obviously having problems with the lack of proper tag syntax.

2:37 pm on Jan 20, 2003 (gmt 0)

New User

10+ Year Member

joined:Jan 18, 2003
posts:13
votes: 0


nope, that's not it. I was playing around with that earlier and accidently posted the "bad" one on the forum. The tag was removed and nothing changed.
4:28 pm on Jan 20, 2003 (gmt 0)

Full Member

10+ Year Member

joined:Dec 13, 2002
posts:307
votes: 0


Fair enough. Probably doesn't help that I pasted a different DTD anyway. Sorry it wasn't that simple. I'll leave you in the [possibly] capable hands of the javascript munchkins, because JS is a whole hill o' beans I just don't do.
8:16 pm on Jan 20, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:July 13, 2002
posts:133
votes: 0


<script type="text/javascript" src="archive.html"></script>
What is this line supposed to do?
It is a reference to an external JavaScript file. Does archive.html actually contain nothing but JavaScript (no HTML, no <!-- comments -->, just JS)?
If so, what are the first two lines of archive.html?

Using the Mozilla or Phoenix [texturizer.net] browser, you get much more detailled JavaScript error messages (in Tools > JavaScript Console) than with IE, so that might help find the problem as well.