Forum Moderators: mack

Message Too Old, No Replies

Syntax Errors

         

Gary_Numan

4:51 pm on Oct 7, 2005 (gmt 0)

10+ Year Member



Does anyone know of a straight talking web site that can help me to work out what a syntax error is and how to cure one?

I am building a site using a basic template in dreamweaver, but some of the pages I am uploading are showing "Done - but with errors on page".

When I double click it just tells me; line 8, character 1, syntax error.

I am in the dark here.

All help appreciated

Gary

"I was in a car crash, or was it the war, but I've never been quite the same"

txbakers

5:01 pm on Oct 7, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi, Syntax errors are more often than not caused by faulty javascript in your HTML.

Bad HTML won't throw a syntax error, it will just look funny or not show up at all.

Unfortunately there isn't a tool to help debug that, you just have to wade through your javascripts to find the bad syntax. Usually a misspelled variable or field name, etc.

Gary_Numan

5:28 pm on Oct 7, 2005 (gmt 0)

10+ Year Member



ok, but to be frank I wouldn't know a good java script from a faulty one!

As a web developer I am like Bambi on the ice! I can just about stand up, but I am still shakey. The slightest problem and I am floored.

Could you give me a few pointers here Thumper...er....I mean txbaker?

Gary

PS- Just out of interest, I have been a member for about 18 months now, but still classed as a new member, why?

txbakers

7:14 pm on Oct 7, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



PS- Just out of interest, I have been a member for about 18 months now, but still classed as a new member, why?

It's the number of posts.

Well, Bambi, you're going to have to learn how to deal with the ice.

I can point you to a good tutorial on javascript, but without posting your scripts here, it's hard to just "teach" everything about good Javascript coding.

visit [w3schools.com...] to get good information and a good javascript section. I was just there this morning in fact and I can skate like Brian Boitano (to continue the metaphor).

We do have a Javascript board here, where you are welcome to post some of your scripts for debugging.

grandpa

7:21 pm on Oct 7, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Most browsers (I think) will have a Javascript Console. The console in Firefox will open the source and highlight the error. Makes it a lot easier when you're on thin ice.