tags:

views:

33

answers:

1
map.setCenter(new GLatLng("{$news[news].long2 }", 101.74), 13);

whats wrong with this ?

A: 

Your post is very short on detail, but what I assume is happening is you've got the above in your smarty template (?).

This is a problem as { } delimits smarty commands. You can:

1) wrap the javascript in literal tags (which disables Smarty parsing)

{literal}
// js here
{/literal}

2) change the delimiters:

$smarty->left_delimiter = '<!--{';
$smarty->right_delimiter = '}-->';

See more at Smarty escaping

Deebster