Welcome to WebmasterWorld Guest from 23.22.46.195

Forum Moderators: open

Syntax Error

IE6 Loads page, but with errors

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

10+ Year Member



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)

WebmasterWorld Senior Member 10+ Year Member



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)

10+ Year Member



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

WebmasterWorld Senior Member 10+ Year Member



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

WebmasterWorld Senior Member 10+ Year Member



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)

10+ Year Member



<!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)

WebmasterWorld Senior Member 10+ Year Member



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)

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



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)

10+ Year Member



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

WebmasterWorld Senior Member 10+ Year Member



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)

WebmasterWorld Senior Member 10+ Year Member



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)

WebmasterWorld Senior Member 10+ Year Member



. 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)

10+ Year Member



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)

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



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)

WebmasterWorld Senior Member 10+ Year Member



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)

10+ Year Member



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)

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



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)

10+ Year Member



<!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)

WebmasterWorld Senior Member 10+ Year Member



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)

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



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)

10+ Year Member



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)

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



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

10+ Year Member



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)

WebmasterWorld Senior Member 10+ Year Member



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)

10+ Year Member



<!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)

10+ Year Member



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)

10+ Year Member



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)

10+ Year Member



<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.

 

Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month