I am trying to use AjaxOptions.OnSuccess to call a javascript function and pass a parameter to it. I can name the base function without parameters without problems, it is just passing parameters.
Here is my JS function:
<script type="text/javascript"> function removeRow (itemId) { alert(itemId); } </script>
And my Razor AjaxOptions ad:
New AjaxOptions With {.OnSuccess = "function(){removeRow(" + item.Id.ToString + ");}"}
On the client side, the link is as follows:
<a data-ajax="true" data-ajax-success="function(){removeRow(3);}" href=...
Any idea what I'm doing wrong?
Thanks!
source share