I have a button click function that is to run a $.getJSON when the button is clicked. It gets some values from a controller posts those to some form fields and opens a modal that contains the form. The first time I click the button it runs the $.getJSON posts the values and opens the modal just fine. when i close the modal and click the button again. It just opens the modal and the values are the old values. It doesn't run the $.getJSON again. I know it doesn't also because I put a break point in the controller. It hits the break point that first time. But won't go into the controller the other times until I completely reload the page.
here is my button click script
$('[id^=edit]').button().click(function () {
var selected = $(this).val();
var arr = selected.split(',');
var item = arr[0];
var parent = arr[1];
$("#itemspan").text(parent);
$("#parentspan").text(item);
$("#partno")[0].value = item;
$("#parent")[0].value = parent;
var url = $("#itemdetailsjsonurl").attr("href");
var fullurl = url + '/' + item + '/' + parent;
$.getJSON(fullurl, null, function (data) {
$("#qty")[0].value = data.qty;
$("#startdate")[0].value = data.sdate;
$("#enddate")[0].value = data.edate;
$("#notes")[0].value = data.memo;
});
$("#edtbomitem").dialog('open');
});
any ideas why?