Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

spot the syntax error?


magicspon

Recommended Posts

Hi,

 

Below is the code for my home page (index.html). The reason i have index.html as my home page is because i was unable to get a flash movie to load into the index.php file.

 

There are two syntax errors in the code, when i look at the details in IE i'm told that they appear on lines 19 and 26 but i've be unable to find the error myself. Can anyone see these errors.

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 <link rel="stylesheet" type="text/css" href="stylesheet.css">
 <style type="text/css">
<!--
.style1 {font-family: Arial, Helvetica, sans-serif}
.style2 {
font-size: 12px;
color: #660000;
font-weight: bold;
}
-->
 </style>
 <head>
<script language="javascript">AC_FL_RunContent = </script>
<script src="AC_RunActiveContent.js" language="javascript"></script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Coco</title>
</head>
<!--$headcontent-->
<script language="javascript"><!--
function popupWindow(url) {window.open(url,'popupWindow',&;'toolbar=no,location=no,directories=no status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height
=100,screenX=150,screenY=150,top=150,left=150')
//--></script>

<body>
<table width="910" border="0" cellpadding="0" cellspacing="0">
 <!--DWLayoutTable-->

 <tr>
<td width="75" rowspan="3" valign="top"><script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0','width','75','height','550','src','/chocolatedrip','quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','/chocolatedrip' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="75" height="550">
 <param name="movie" value="/chocolatedrip.swf" />
 <param name="quality" value="high" />
 <embed src="/chocolatedrip.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="75" height="550"></embed>
</object></noscript>
<script type="text/javascript" src="includes/sts_templates/test/ieupdate.js"></script>
 </td>
 <td height="32" colspan="9" valign="top"><table width="94%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
  <td width="738" height="25"><img src="Lines.jpg" width="735" height="32" /></td>
	</tr>
 </table></td>
 <td width="100" rowspan="2" valign="top"><img src="Coco.jpg" alt="Coco" width="100" height="52" /></td>
 </tr>
 <tr>
<td width="111" height="21" valign="top"><!--DWLayoutEmptyCell--> </td>
<td width="56" valign="top"><a href="includes/sts_templates/test/index.php"></a> <a href="index.html"><img src="home.jpg" alt="Home" width="42" height="21" border="0" /></a></td>
<td width="62" valign="top"><a href="index.php?cPath=21"><img src="sweets.jpg" alt="Sweets" width="51" height="21" border="0" /></a></td>
<td width="81" valign="top"><a href="index.php?cPath=23"><img src="sugarfree.jpg" alt="Sugar Free" width="72" height="21" border="0" /></a></td>
<td width="78" valign="top"><a href="index.php?cPath=22"><img src="chocolate.jpg" alt="Chocolate" width="69" height="21" border="0" /></a></td>
<td width="86" valign="top"><a href="index.php?cPath=24"><img src="handmade.jpg" alt="Handmade" width="80" height="21" border="0" /></a></td>
<td width="90" valign="top"><a href="account.php"><img src="account.jpg" alt="My Account" width="82" height="21" border="0" /></a></td>
<td width="103" valign="top"><a href="shopping_cart.php"><img src="shoppingcart.jpg" alt="Shopping Cart" width="96" height="21" border="0" /></a></td>
<td width="68" valign="top"><a href="checkout_shipping.php"><img src="checkout.jpg" alt="Checkout" width="68" height="21" border="0" /></a></td>
 </tr>
 <tr>
<td height="516" colspan="10" valign="top"><script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0','width','835','height','490','src','homepage','quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','homepage' ); //end AC code
</script>	  <noscript>
  <p>
	<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="835" height="490">
	  <param name="movie" value="homepage.swf" />
	  <param name="quality" value="high" />
	  <embed src="homepage.swf" width="835" height="490" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>
	  <br />
	</object>
  </p>
</noscript></td>
 </tr>
 <tr>
<td height="19" colspan="11" valign="top"><div align="center" class="style1"><span class="style2">-- <a href="contact_us.php">Contact</a> -- <a href="conditions.php">Terms & Conditions</a> -- <a href="privacy.php">Privacy</a> -- <a href="shopping_cart.php">Shopping Cart</a> -- <a href="login.php">Login</a> -- <a href="logoff.php">Logout</a> </span> --</div></td>
 </tr>
 <tr>
<td height="19" colspan="11" valign="top"><div align="center"><span class="style2">Site built by <a href="http://www.gumproductions.co.uk">Gum Productions</a> ©</span></div></td>
 </tr>
</table>
</body>
</html>

 

Thanks in advance.

 

Dave

Link to comment
Share on other sites

I don't think that ampersand should be there, a missing comma and a missing end curly brace. Plus the script should be in the <head>. You have it between </head> and <body>.

 

<script language="javascript"><!--

function popupWindow(url) {window.open(url,'popupWindow',&;'toolbar=no,location=no,directories=no, status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height

=100,screenX=150,screenY=150,top=150,left=150')

}

//--></script>

 

Or this:

 

<script language="javascript"><!--
function popupWindow(url) {window.open(url,'popupWindow','toolbar=no,location=no,directories=no, status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height
=100,screenX=150,screenY=150,top=150,left=150')
}
//--></script>

Link to comment
Share on other sites

I don't think that ampersand should be there, a missing comma and a missing end curly brace. Plus the script should be in the <head>. You have it between </head> and <body>.

 

<script language="javascript"><!--

function popupWindow(url) {window.open(url,'popupWindow',&;'toolbar=no,location=no,directories=no, status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height

=100,screenX=150,screenY=150,top=150,left=150')

}

//--></script>

 

Or this:

 

<script language="javascript"><!--
function popupWindow(url) {window.open(url,'popupWindow','toolbar=no,location=no,directories=no, status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height
=100,screenX=150,screenY=150,top=150,left=150')
}
//--></script>

 

Agreed.

 

it's this semi-colon :

&;

 

Also - this seems to be spanning two lines :

function popupWindow(url) {window.open(url,'popupWindow',&;'toolbar=no,location=no,directories=no status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height

=100,screenX=150,screenY=150,top=150,left=150')

 

I have a line break after the height attribute.

Link to comment
Share on other sites

Hi,

 

Thanks for your help, still getting some syntax errrors.... Here is the changed the code

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 <link rel="stylesheet" type="text/css" href="stylesheet.css">
 <style type="text/css">
<!--
.style1 {font-family: Arial, Helvetica, sans-serif}
.style2 {
font-size: 12px;
color: #660000;
font-weight: bold;
}
-->
 </style>
 <head>
<script language="javascript">AC_FL_RunContent = </script>
<script src="AC_RunActiveContent.js" language="javascript"></script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Coco</title>
<!--$headcontent-->
<script language="javascript"><!--
function popupWindow(url) {window.open(url,'popupWindow','toolbar=no,location=no,directories=no, status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height
=100,screenX=150,screenY=150,top=150,left=150')
}
//--></script>
</head>
<body>
<table width="910" border="0" cellpadding="0" cellspacing="0">
 <!--DWLayoutTable-->
 <tr>
<td width="75" rowspan="3" valign="top"><script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0','width','75','height','550','src','/chocolatedrip','quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','/chocolatedrip' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="75" height="550">
 <param name="movie" value="/chocolatedrip.swf" />
 <param name="quality" value="high" />
 <embed src="/chocolatedrip.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="75" height="550"></embed>
</object></noscript>
<script type="text/javascript" src="includes/sts_templates/test/ieupdate.js"></script>
 </td>
 <td height="32" colspan="9" valign="top"><table width="94%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
  <td width="738" height="25"><img src="Lines.jpg" width="735" height="32" /></td>
	</tr>
 </table></td>
 <td width="100" rowspan="2" valign="top"><img src="Coco.jpg" alt="Coco" width="100" height="52" /></td>
 </tr>
 <tr>
<td width="111" height="21" valign="top"><!--DWLayoutEmptyCell--> </td>
<td width="56" valign="top"><a href="includes/sts_templates/test/index.php"></a> <a href="index.html"><img src="home.jpg" alt="Home" width="42" height="21" border="0" /></a></td>
<td width="62" valign="top"><a href="index.php?cPath=21"><img src="sweets.jpg" alt="Sweets" width="51" height="21" border="0" /></a></td>
<td width="81" valign="top"><a href="index.php?cPath=23"><img src="sugarfree.jpg" alt="Sugar Free" width="72" height="21" border="0" /></a></td>
<td width="78" valign="top"><a href="index.php?cPath=22"><img src="chocolate.jpg" alt="Chocolate" width="69" height="21" border="0" /></a></td>
<td width="86" valign="top"><a href="index.php?cPath=24"><img src="handmade.jpg" alt="Handmade" width="80" height="21" border="0" /></a></td>
<td width="90" valign="top"><a href="account.php"><img src="account.jpg" alt="My Account" width="82" height="21" border="0" /></a></td>
<td width="103" valign="top"><a href="shopping_cart.php"><img src="shoppingcart.jpg" alt="Shopping Cart" width="96" height="21" border="0" /></a></td>
<td width="68" valign="top"><a href="checkout_shipping.php"><img src="checkout.jpg" alt="Checkout" width="68" height="21" border="0" /></a></td>
 </tr>
 <tr>
<td height="516" colspan="10" valign="top"><script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0','width','835','height','490','src','homepage','quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','homepage' ); //end AC code
</script>	  <noscript>
  <p>
	<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="835" height="490">
	  <param name="movie" value="homepage.swf" />
	  <param name="quality" value="high" />
	  <embed src="homepage.swf" width="835" height="490" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>
	  <br />
	</object>
  </p>
</noscript></td>
 </tr>
 <tr>
<td height="19" colspan="11" valign="top"><div align="center" class="style1"><span class="style2">-- <a href="contact_us.php">Contact</a> -- <a href="conditions.php">Terms & Conditions</a> -- <a href="privacy.php">Privacy</a> -- <a href="shopping_cart.php">Shopping Cart</a> -- <a href="login.php">Login</a> -- <a href="logoff.php">Logout</a> </span> --</div></td>
 </tr>
 <tr>
<td height="19" colspan="11" valign="top"><div align="center"><span class="style2">Site built by <a href="http://www.gumproductions.co.uk">Gum Productions</a> ©</span></div></td>
 </tr>
</table>
</body>
</html>

 

Any ideas

 

thanks

Dave

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...