[SOLVED] Adding a link to view the record
[SOLVED] Adding a link to view the record
Ekoster
Posts: 12Questions: 0Answers: 0
Currently I made my datatable have an 'action' column. This is shown correctly. In the column I made a link, also shown correctly with correct ID information. However for some reason the link is not triggering the javascript. I use this for I want to call a controller action (MVC) with specific variables and open the view in a specific div.
my 'mRender' value of the column
[code]var tmpId = full.iInquiryId;
var tmpType = full.strType;
var strAction = "View";
return ''+ strAction +'';
[/code]
then the java script I made
[code]
//$.get('@@Url.Action("InquiryDetail", "Inquiry", new { strType = "' + strType + '", iInquiryId = ' + iInquiryId + ' } )', function (data) {
// $('#msspPageContent').html(data);
//});
alert("hi");
[/code]
As you see, I made the script as simple as possible to show 'hi' but it doesn't work. In Fiddler I don't even see the click. The results I saw here didn't help yet.
Maybe I'm going down the wrong road, so please advise if this is true.
my 'mRender' value of the column
[code]var tmpId = full.iInquiryId;
var tmpType = full.strType;
var strAction = "View";
return ''+ strAction +'';
[/code]
then the java script I made
[code]
//$.get('@@Url.Action("InquiryDetail", "Inquiry", new { strType = "' + strType + '", iInquiryId = ' + iInquiryId + ' } )', function (data) {
// $('#msspPageContent').html(data);
//});
alert("hi");
[/code]
As you see, I made the script as simple as possible to show 'hi' but it doesn't work. In Fiddler I don't even see the click. The results I saw here didn't help yet.
Maybe I'm going down the wrong road, so please advise if this is true.
This discussion has been closed.
Replies