asp.net mvc - jQuery issue with identical call when triggered from tab and button -
i have mvc page jquery-ui tabs. when user selects relevant tab jquery ajax call executed load select list. works fine. user can reload list clicking button perform same call once again. when called button ajax call fails!! tried swap order , skip call on tab display, in order make button load first event. still gave same error. the ajax call isolated in same function being called. how can different when called different events? this related code: $("#tabs").tabs({ show: function (event, ui) { var tabname = $(ui.tab).attr("href"); if (tabname == "#tabresult") loadresults(); } }); $("#btnloadresults").click(function () { loadresults(); }); function loadresults() { var testcaseid = $("#testcase_id").val(); $.getjson("api/testsapi/getresults", { testcaseid: testcaseid }) .done(function (data) { $("#lstresults").empty(); ...