[SOLVED] Adding a link to view the record

[SOLVED] Adding a link to view the record

EkosterEkoster Posts: 12Questions: 0Answers: 0
edited April 2014 in DataTables 1.10
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.

Replies

  • EkosterEkoster Posts: 12Questions: 0Answers: 0
    Just figured it out. I changed my code to capture the click (like with dblClick). Then it started working immediatly.
This discussion has been closed.