Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

Smarty is smart enough to convert this html code in tpl ?

 
Post new topic   Reply to topic    Smarty Forum Index -> Add-ons
View previous topic :: View next topic  
Author Message
pr_4u
Smarty n00b


Joined: 30 Jul 2012
Posts: 2

PostPosted: Wed Aug 01, 2012 2:00 am    Post subject: Smarty is smart enough to convert this html code in tpl ? Reply with quote

<HTML>
<HEAD>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false">
</script>
<script type="text/javascript">
function initialize()
{
var latlng = new google.maps.LatLng(5.93,76.276);
var opt =
{
center:latlng,
zoom:10,
mapTypeId: google.maps.MapTypeId.ROADMAP,
disableAutoPan:false,
navigationControl:true,
navigationControlOptions: {style:google.maps.NavigationControlStyle.SMALL },
mapTypeControl:true,
mapTypeControlOptions: {style:google.maps.MapTypeControlStyle.DROPDOWN_MENU}
};
var map = new google.maps.Map(document.getElementById("map"),opt);
var marker= new google.maps.Marker({
position: new google.maps.LatLng(9.931544168615512,76.27632894178791),
title: "CodeGlobe",
clickable: true,
map: map
});


var infiwindow = new google.maps.InfoWindow(
{
content: " I am here! "

});


google.maps.event.addListener(marker,'mouseover',function(){
infiwindow.open(map,marker);
});
google.maps.event.addListener(marker,'mouseout',function(){
infiwindow.close(map,marker);
});


}
function test(event)
{

alert( event.latLng.lat());
alert(event.latLng.lng());

}
</script>
<style type"text/css">
#map{
width:500px;
height:500px;
float:left;
position:absolute;
left:300px;
top:200px;

}
</style>
</HEAD>

<BODY onload="initialize();">
<div id="map" >

</div>
</BODY>
</HTML>
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5052
Location: Hamburg / Germany

PostPosted: Wed Aug 01, 2012 4:54 pm    Post subject: Reply with quote

See http://www.smarty.net/docs/en/language.escaping.tpl

you must use {literal}.... {/literal} tags to escape the javascript usage of { and }
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Add-ons All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP