Forum Moderators: open
Line: 56
Char: 3
Error: Syntax Error
Code: 0
The line where this error is on both pages: <param name="base" value="." />
The page also has the same error on it, in the same place. While the pages still come up, it doesn't look good for visitors to see "Done but with errors" at the bottom of the browser. I've tested the site in Netscape and Firefox, but the error just seems to be in IE. Any suggestions?
[edited by: BlobFisk at 1:33 pm (utc) on Sep. 5, 2006]
It works fine in Netscape and Firefox
In FF, go to Tools->Javascript console, this will give you a more accurate indication of the problem. It will be Javascript.
It's also possible it's a conditional being executed only in IE, that is, look for
if (document.all)
This is an old IE 4.0 method, still in use by DW and other MM apps - only IE indexed page objects by the "all" array.
Error: www is not defined
Source file: javascript:www.example.com/index2.html
Error: syntax error
Source file: javascript:<param name="base" value="." />
<param name="base" value="." />
Now that tells me that it's a JavaScript error, but what exactly does that mean and what do I do to correct it?
I thought that it was my mp3 player, but it's not. It's referring to Flash text. I have 2 Flash text links, but only the first one is causing the syntax error on both pages. The only thing that I can think of is maybe the value="." should be something else? Any suggestions would be helpful.
[edited by: encyclo at 11:12 pm (utc) on Sep. 5, 2006]
[edit reason] examplified [/edit]
- open Javascript console
- Click CLEAR to clear errors
- Go to the page in question
- Now open the Javascript console again and click the All or Errors button.
Any errors in your code or even the CSS declarations will show up here. What do you see?
If you don't gain any inspiration that way we're going to have to ask you post your code in this thread so we can see it. :-)
Here's the code for the Flash text where the syntax error is located:
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="56" height="15">
<param name="movie" value="text1.swf" />
<param name="quality" value="high" />
<param name="base" value="." /> (syntax error is supposedly here)
<param name="bgcolor" value="#000000" />
<param name="scale" value="exactfit" />
<embed src="text1.swf" base="." quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" scale="exactfit" width="56" height="15" bgcolor="#000000"></embed>
</object>
One thing to take into consideration is that IE is not very accurate when giving line numbers .... the line numbers in error message could be wrong.
You did see this, correct? IE's idea of "line 56" does not actually fall within this code. Is there Javascript before or after this chunk?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<!-- saved from url=(0014)about:internet -->
<!-- this and above comment should be removed for live, non-demo use -->
<head>
<title>Title</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="Description" content="My Description " />
<meta name="Keywords" content="blah blah" />
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW ¦¦ innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
</head>
<body bgcolor="#000000" text="#FF6600" link="#FF0000" vlink="#FF9933" alink="#CC6600">
<div id="Layer1" style="position:absolute; left:668px; top:57px; width:253px; height:304px; z-index:1">
<div align="center">
<object data="mp3player.swf" type="application/x-shockwave-flash" name="mp3"
width="280" height="300" wmode="transparent">
<param name="movie" value="mp3player.swf" />
<param name="wmode" value="transparent" />
<embed src="mp3player.swf" width="280" height="300" wmode="transparent" name="mp3"></embed>
</object>
</div>
</div>
<div id="Layer2" style="position:absolute; left:669px; top:395px; width:282px; height:34px; z-index:2"><font color="#FF9900" size="1" face="Verdana, Arial, Helvetica, sans-serif">To
use the mp3 player: Click on it to activate the player. Use the black scrollbar
on the right side to see all of the clips.</font></div>
<table width="95%" border="0" align="center" cellspacing="1">
<tr>
<td width="67%" height="461">
<div align="center"><img src="_logo.jpg" alt="alt text" width="469" height="423" /></div></td>
<td width="33%" align="center" valign="top"> <p><font color="#FF6600" size="2" face="Verdana, Arial, Helvetica, sans-serif">
</font></p>
<p> </p>
<p> </p>
<p> </p></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="1">
<tr>
<td height="48">
<div align="center">
<p><img src="brdrtop.gif" width="600" height="36" /></p>
<p><font color="#FF6600" size="2" face="Verdana, Arial, Helvetica, sans-serif">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="56" height="15">
<param name="movie" value="text1.swf" />
<param name="quality" value="high" />
<param name="base" value="." />
<param name="bgcolor" value="#000000" />
<param name="scale" value="exactfit" />
<embed src="text1.swf" base="." quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" scale="exactfit" width="56" height="15" bgcolor="#000000"></embed>
</object>
</font> *
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="145" height="15">
<param name="movie" value="text2.swf" />
<param name="quality" value="high" />
<param name="base" value="." />
<param name="bgcolor" value="#000000" />
<param name="scale" value="exactfit" />
<embed src="text2.swf" base="." quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" scale="exactfit" width="145" height="15" bgcolor="#000000"></embed>
</object>
</p>
</div></td>
</tr>
</table>
<table width="85%" border="0" align="center" cellspacing="4">
<tr>
<td width="52%"><p><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Caveman's
Story: </strong></font></p>
<p><font color="#FF6600" size="2" face="Verdana, Arial, Helvetica, sans-serif">text </font></p>
<font color="#FF9900" size="2" face="Verdana, Arial, Helvetica, sans-serif"><font face="Georgia, Times New Roman, Times, serif">
<p><font color="#FF6600" face="Verdana, Arial, Helvetica, sans-serif">Text.</font></p>
<td width="42%" align="center" valign="bottom"> <div align="center">
<!-- Start of StatCounter Code -->
<!-- End of StatCounter Code -->
</div></td>
<td width="29%" align="right" valign="bottom"> <div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Last
Updated:
<!-- #BeginDate format:Am1 -->September 5, 2006<!-- #EndDate -->
</font></div>
</td>
</tr>
</table>
</body>
</html>
One other thing... I only get the syntax error on the "live" site, not when I preview it. When I open the 2 files in question that have the syntax error on them (index2.html and pics.html), by browsing to the files on my computer, and open them in IE, I don't get the syntax error. It's only when I look at the "live" site -www.mysite.com that I get the error. Could it be a server problem?
[edited by: encyclo at 10:29 am (utc) on Sep. 6, 2006]
[edit reason] removed stats ID code [/edit]
//reloads the window if Nav4 resized
If that's it's only function, try just removing that entire JS block. This is an old trick that corrected NN 4's inability to move with the page's absolutely positioned objects. Blame Macromedia and DW for that one. :-)
The only other grains I have to offer are I ran the HomeSite validator on this page as you presented it, with the object tags. I have it enabled for HTML 2.0, 3.2, 4.0, and ColdFusion validation. The results I got are below, minus the XML and font warnings.
The XML warnings kicked off for each /> are as follows:
The tag: "param" has an XML style closing syntax for an empty element even though version: "HTML4" is not an XML tag language.
All this means is you're using a 4.01 trans. doctype and it's not an XML document, so why are you using XML tags? It's a warning, not a code error, and won't cause a JS error.
The other warning I have not posted here is in reference to font tags:
In HTML 4.0, FONT is deprecated. It may become obsolete in future versions, consider using style sheets instead.
This is also just a warning, but you really should pull out all your font tags and style attributes and put them in a style sheet. Also just warnings, won't kick off a JS error.
I also got these two, to which there's no short workaround, and also would not be the cause of your error. Google for the "Satay method". If you're going to be using Flash freqently, you really need to be aware of the Satay method:
The tag: "object" doesn't have an attribute: "wmode" in currently active versions.
The tag name: "embed" not found in currently active versions
You will get a more accurate validation from the W3C validator:
[validator.w3.org...]
The remaining errors I've pasted below ARE relevant and could be the cause of the problem, for example, no opening HTML tag.
So I only have big "donno" here, but start with a validated document and try removing the Javascript, it doesn't look like you need it.
Here's the remaining errors generated by HomeSite's validator (as said, minus the XML and font warnings:
Line Message
81 The tag:"p" is not allowed within: "font" It is only allowed within: button, del, fieldset, iframe, ins, noframes, noscript, object.
83 The tag:"td" is not allowed within: "font". No valid contexts are specified for this element in currently active versions.
87 The tag:"td" is not allowed within: "font". No valid contexts are specified for this element in currently active versions.
94 Nesting error, "font" should be closed before closing "table"
94 The tag: " td" allows optional end tag. End tag: "table" closes "td" context. Validation will proceed as if the tag were ended.
96 No starting tag found for: "html", or it was closed too many times