homepage Welcome to WebmasterWorld Guest from 54.234.2.94
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
Syntax Error
IE6 Loads page, but with errors
susanlprince




msg:1493342
 8:53 pm on Jan 18, 2003 (gmt 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]

 

pendanticist




msg:1493343
 8:55 pm on Jan 18, 2003 (gmt 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]

susanlprince




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

oops...sorry...nevermind.

pendanticist




msg:1493345
 8:57 pm on Jan 18, 2003 (gmt 0)

Go back and break the link before the mods do..

pendanticist




msg:1493346
 9:06 pm on Jan 18, 2003 (gmt 0)

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

Pendanticist.

susanlprince




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

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

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

pendanticist




msg:1493348
 9:29 pm on Jan 18, 2003 (gmt 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.

tedster




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

Since line 2 character 1 seems to be the quotation marks, I'm wondering if you accidentally have "smart" quotes there.

susanlprince




msg:1493350
 4:16 am on Jan 19, 2003 (gmt 0)

I do not know what "smart" quotes are?

pendanticist




msg:1493351
 4:20 am on Jan 19, 2003 (gmt 0)

He's referring to that part where you had your url instead of the one you needed to have.

msr986




msg:1493352
 4:21 am on Jan 19, 2003 (gmt 0)

susanlprince,

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

-Marty

pendanticist




msg:1493353
 4:37 am on Jan 19, 2003 (gmt 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.

susanlprince




msg:1493354
 4:39 am on Jan 19, 2003 (gmt 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

tedster




msg:1493355
 4:44 am on Jan 19, 2003 (gmt 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.

msr986




msg:1493356
 4:49 am on Jan 19, 2003 (gmt 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.

susanlprince




msg:1493357
 4:50 am on Jan 19, 2003 (gmt 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

tedster




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

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

susanlprince




msg:1493359
 5:03 am on Jan 19, 2003 (gmt 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.

msr986




msg:1493360
 5:25 am on Jan 19, 2003 (gmt 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.

tedster




msg:1493361
 5:32 am on Jan 19, 2003 (gmt 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.

susanlprince




msg:1493362
 5:36 am on Jan 19, 2003 (gmt 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?

tedster




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

That all depends. What change made the syntax error stop appearing?

susanlprince




msg:1493364
 1:43 pm on Jan 19, 2003 (gmt 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?

msr986




msg:1493365
 11:03 pm on Jan 19, 2003 (gmt 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.

WibbleWobble




msg:1493366
 11:56 am on Jan 20, 2003 (gmt 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.

susanlprince




msg:1493367
 2:37 pm on Jan 20, 2003 (gmt 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.

WibbleWobble




msg:1493368
 4:28 pm on Jan 20, 2003 (gmt 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.

c3oc3o




msg:1493369
 8:16 pm on Jan 20, 2003 (gmt 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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved