Hello.
I have set data using jtempates but i got error."Uncaught TypeError: $(...).setTemplateURL is not a function"
i m using this reference "
Using the jTemplate jquery plugin with ajax and ASP.NET | Joe Stevens' Blog[
^]
and my code is :-
<script src="../js/jquery.js"></script>
<script src="../js/jquery.min.js"></script>
<script src="http://localhost:46740/Momtaz/User/js/jtemplates.js"></script>
<script>
$(document).ready(function () {
BindData("All");
});
function BindData(name) {
$.ajax({
type: "POST",
url: 'http://localhost:46740/Momtaz/User/MemberDetails.aspx/GetData',
data: JSON.stringify({ 'tName': name }),
contentType: "application/json; charset=utf-8",
dataType: "json",
async: true,
success: function (data) {
debugger;
var placeData = data.d;
$('#divMemberPlaceData').html("loading..");
$('#divMemberPlaceData').setTemplateURL('User/htmlFile/AllMember.html');
$('#divMemberPlaceData').processTemplate(placeData);
}
});
}
</script>
What I have tried:
<script src="../js/jquery.js"></script>
<script src="../js/jquery.min.js"></script>
<script src="http://localhost:46740/Momtaz/User/js/jtemplates.js"></script>
<script>
$(document).ready(function () {
BindData("All");
});
function BindData(name) {
$.ajax({
type: "POST",
url: 'http://localhost:46740/Momtaz/User/MemberDetails.aspx/GetData',
data: JSON.stringify({ 'tName': name }),
contentType: "application/json; charset=utf-8",
dataType: "json",
async: true,
success: function (data) {
debugger;
var placeData = data.d;
$('#divMemberPlaceData').html("loading..");
$('#divMemberPlaceData').setTemplateURL('User/htmlFile/AllMember.html');
$('#divMemberPlaceData').processTemplate(placeData);
}
});
}
</script>