iEntry 10th Anniversary Forum Rules Search
WebProWorld
Register FAQ Calendar Mark Forums Read
Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Share Thread: & Tags

Share Thread:

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-19-2005, 12:52 AM
WebProWorld Pro
 
Join Date: Oct 2004
Location: NYC, USA
Posts: 147
web-content-king RepRank 0
Default Error: Syntax Error in IE

Anyone can decipher this IE Error? Where in the code can I find the error? Line 2 of the HTML is the <html> tag.

Line: 2
Char: 1
Error: Syntax error
Code: 0
URL: http://www.upmarketcontent.com/demo/

I really have tried searching this on the web but there are so many different syntax errors you'd be amazed, and none of them have much to do with each other. Such an economy of words Microsoft has to fit so many disparate problems into a single, brief error message.
Reply With Quote
  #2 (permalink)  
Old 03-19-2005, 12:30 PM
ADAM Web Design's Avatar
WebProWorld 1,000+ Club
 
Join Date: Dec 2003
Location: Toronto, Ontario, Canada
Posts: 2,181
ADAM Web Design RepRank 1
Default

Whenever you see "Syntax error", 99.9% of the time it's a Javascript error. Quite often it relates to a script that hasn't been called.

In your case, my suspicion is here:
Code:
<script type="text/javascript" src="http://upmarketontent.com/images/vernavbar.js"></script>
You're missing the "c" in Content.

Start there, see if that solves your issue, and if not, then I'd suggest getting either Netscape or Firefox and when the page is loaded, type "javascript:" (with the colon, but without the quotes) into your address bar.

Edit: two things I've also noticed.

1) You don't have to put in the "http://www.upmarketcontent.com" part when calling scripts/images on your own server. Just use a path relative to the root directory (e.g. /images/picture_on_the_top_left.jpg as opposed to http://www.upmarketcontent.com/image...e_top_left.jpg). It will help to prevent the error described above from happening.

2) You should keep your scripts in their own folder (not images) so that your site's easier to maintain and you're not going through 1000 files trying to find one.
Reply With Quote
  #3 (permalink)  
Old 03-19-2005, 02:28 PM
WebProWorld Pro
 
Join Date: Oct 2004
Location: NYC, USA
Posts: 147
web-content-king RepRank 0
Default

Thanks so much for pointing that missing "c" out to me! Don't know how I missed it except that my eyes must have glazed over after seeing it so often.

Here was the real culprit, this script link to my affiliate tracking script:

<script type="text/javascript" src="http://upmarketcontent.com/images/asflexilinkcode.js"></script>

It links to the below script, which produced no errors when I placed it directly inside the html. What was I doing wrong with the link?

<SCRIPT LANGUAGE=JAVASCRIPT>
var myURL=window.location.href;
var qLoc=0;

for (var i=1; i < myURL.length; i++)
{
if (myURL.charAt(i)=='?') qLoc=i;
}

if (qLoc > 0)
{
myURL = myURL.substring(qLoc+1,myURL.length);

document.write("<img src=\"http://coldfusion.affiliateshop.com/FlexiLink.cfm?AID=" + myURL + "\" width=1 height=1>");

}
</SCRIPT>
Reply With Quote
  #4 (permalink)  
Old 03-20-2005, 02:42 AM
ADAM Web Design's Avatar
WebProWorld 1,000+ Club
 
Join Date: Dec 2003
Location: Toronto, Ontario, Canada
Posts: 2,181
ADAM Web Design RepRank 1
Default

Your bracketing is incorrect.

Your for loop needs a beginning and end bracket, and so do each of your IF statements (yes, you can put if statements on one line, but they look messy and they're inconsistent.)
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 06:42 PM.



Search Engine Optimization by vBSEO 3.3.0