I am try to get the values from the selected row and pass them through $.getJSON as parameters. I can get the value, however, when I click on the link strange characters appear before and after the value. The character in the link appears as %OA++++++++++value+++++++%0A.
Here is my code
var className='';
var Section='';
$('#listsubject tr').click(function () {
var th = $(this);
var td = $(this).find('td');
$.each(td, function (index, item) {
if (index == 2) className = item.innerHTML;
});
$.getJSON('@Url.Action("getStudentList/","Student")',
{ classname: className
}, function (data) {
alert('test');
});
Kindly help me. Am stuck here
Thanks in advance
EDIT
when i try the code
$.getJSON('@Url.Action("getStudentList/","Student")',
{ classname: className,
section:'A'
}, function (data) {
alert('test');
});
in the link the section part shows fine, only problem is with the classname
UPDATE
fiddle link
http://jsfiddle.net/gordon/vzTDc/2/
Try this. I think its OK now.
DEMO