Does anyone know how to get the dynamic button id inside the jquery dialog..
here i have some code to doing but its not working....
Below i have to get the id for the Save button.. how to get it..
please help me to find out....
buttons: {
'Close': function() {
$(this).dialog('close');
},
'Clear': function() {
$("input[type='text']").attr("value", "");
$("#spnCustomerId").html("");
},
'Save':
//id:'fooButton', priority: 'primary', click: function() { // Here how to get the id for the Save button
function() {
debugger;
$.ajax(
{
type: "GET",
url: "../DataFiles/CustomerRegistration.ashx",
cache: false,
dataType: "text",
data: { type: "SPP", CustomerId: $('#spnCustomerId').html(), FirstName: $('#txtFirstName').val(), LastName: $('#txtLastName').val(), CustomerName: $('#txtCompanyName').val(), Address: $('#txtAddress').val(), City: $('#txtCity').val(), ZipCode: $('#txtZipCode').val(), PhoneNo: $('#txtPhoneNo').val(), Email: $('#txtEmail').val(), NoOfUser: $('#txtNoOfUser').val(), Website: $('#txtWebsite').val(), Title: $('#txtTitle').val(), State: $('#DrpCustomerState').val(), Country: $('#txtCountry').val(), AddressId: $('#spnAddress').html(), CompanySize: $('#txtCompanySize').val() },
success: function(msg) {
if (msg.toString() == "Success") {
// GetCustomerName();
debugger;
alert(msg);
//location = "../Customer/Customer.aspx";
}
else {
debugger;
location = "../Customer/Customer.aspx";
}
}
}
)
$(this).dialog('close');
}

New Topic/Question
Reply




MultiQuote


|