0

I am using the jQuery Load method.

 $('#tabs-1').load("@Html.Raw(Url.Action("IndexTpUse",
                                    "Transactions"))", completed);

 function completed(response, status, xhr)
 {

 }

What I need is to send an additional parameter from the load method into the completed function. Is it possible?

So that my final result might be something like this:

 function completed(response, status, xhr, additionalParam)
 {

 }

Thanks

user2779312
  • 661
  • 2
  • 9
  • 23

1 Answers1

1

You can use bind to predefine some function parameters:

$('#tabs-1').load("@Html.Raw(Url.Action("IndexTpUse","Transactions"))", completed.bind(null, 'my param value'));

 function completed(additionalParam, response, status, xhr)
 {

 }
levi
  • 23,693
  • 18
  • 59
  • 73