TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
kunal s
NA
1
2.2k
Mvc3 append javascript function to link in html table generated from JSON
May 11 2012 5:09 AM
I have following content in my view file (.cshtml)
function FillFeedCharges()
{
var link;
var idModel = $("#sGroup_cd").val();
if (idModel != "") {
$.getJSON("@Url.Content("~/GroupMast/List")", { sGroup_cd: idModel, sCompany_cd :"01"},
function (data) {
var header = '<tr><td> ' + '</td>' + '<td> </td>' + '<td>Description' + '</td>' + '<td> </td>' + '<td>' + 'DateStarted' + '</td>'+ '<td> </td>' +'<td>' + 'AvgCalories' + '</td>' + '<td> </td>' +'<td>' + 'Pounds' + '</td>' + '<td> </td>' +'<td>' + 'Cost' + '</td>' +'</tr>' ;
$('#users table').append(header);
$.each(data, function (key, val) {
var user = '<tr><td>'+'<a onclick='+
'javascript:CallEditDetail()'
+'>Click here</a>' +'</td>' + '<td> </td>' + '<td>' + val.Description + '</td>' + '<td> </td>' + '<td>' + val.DateStarted + '</td>'+ '<td> </td>' +'<td>' + val.AvgCalories + '</td>' + '<td> </td>' +'<td>' + val.Pounds + '</td>' + '<td> </td>' +'<td>' + val.Cost + '</td>' +'</tr>';
$('#users table').append(user);
});
});
when i Called 'CallEditDetail' function in $(document).ready(function () it is not callled and give error as 'CallEditDetail not declared' and if i called from outside the $(document).ready(function () it is called. Please help me
Reply
Answers (
0
)
Please modify the java script for filtering the html table
Crystal reports