This topic is locked

smarty error / syntax error

4/11/2008 9:35:40 PM
PHPRunner General questions
N
nickrix author

Hi All,

Im trying this software one more time before i decide to purchase. but there is one thing im stuck on so far.
i want to include a map on the listings page using the below script but i get the smarty error and syntax error shown below.
CODE I WANT TO USE:

<script src="http://maps.google.com/maps?file=api&v=1&key=ABQIAAAADAKs-dVdcD-E0B7esUk0bhS2xjqrZWkMaLKPzbTxjNpe1T8L2BQIoAx2PS8pGC5OoK0CfotOUjH5yw"; type="text/javascript"></script>
<script language="javascript">

var map;

function createMap(){

map = new GMap(document.getElementById("map"));

map.addControl(new GSmallMapControl());

var s = document.createElement( "script" );

s.src="http://www.localsearchmaps.com/geo/?zip=cf5+3sf&country=uk&level=1";;

s.type = "text/javascript";

document.getElementsByTagName( "head" )[0].appendChild(s);
}

window.onload=createMap;
</script>

</head>

<body>

<div id="map" style="width: 350px; height: 200px; z-index:999"></div>
ERROR MESSAGE:

Error type 256

Error description Smarty error: [in Basic_Data_view.htm line 11]: syntax error: unrecognized tag 'map' (Smarty_Compiler.class4.php, line 580)
Any ideas??

S
spintz 4/11/2008

Surround that code with {literal}{/literal} tags. It's because you're javascript has { and } in it, and smarty wants to process them.