vendredi 27 juin 2014

Is it possiable to use script elements inside the tpl attiribute


Vote count:

0




Is it possiable to use script elements inside the tpl attiribute.What I wanna do in my senario is add some script elements inside the tpl.how can I do that.(I have buttons inside it and wanna add soem events those buttons via javascript)


here is the my code but it gives the error.



.Tpl(
Html.X().XTemplate()
.Html(


@<text

<tpl for="."> <p></p>
<script>alert("bumm");</script>


<div class="thumb-wrap" id="{Ad}">
<div class="item col-xs-4 col-lg-4">

<div class="thumbnail">
<img class="group list-group-image" src="http://ift.tt/1obVhqI" alt="" />
<div class="caption">
<h4 class="group inner list-group-item-heading">
{Ad}</h4>
<p class="group inner list-group-item-text">
{Aciklama}</p>
<div class="row">
<div class="col-xs-12 col-md-6">
<p class="lead">
{Fiyat} TL</p>
<p class="lead urunkodu" id="urunkodu" >
{UrunKodu}</p>
</div>
<div class="col-xs-12 col-md-6">
<input type="button" class="btn btn-success" id="sepeteEkle_{ID}" value="Sepete ekle"></input>
</div>
</div>
</div>
</div>
</div>

</div>
</tpl>
<div class="x-clear"></div>
</text>
)
)


asked 1 min ago

sakir

684





Aucun commentaire:

Enregistrer un commentaire