how to get dynamic button id inside jquery dialog

how to get dynamic button id inside jquery dialog

Page 1 of 1

0 Replies - 5998 Views - Last Post: 24 November 2009 - 02:36 AM Rate Topic: -----

#1 chandrul  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 24-November 09

how to get dynamic button id inside jquery dialog

Posted 24 November 2009 - 02:36 AM

Hi,

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');
				   
				   
				   
				}


Is This A Good Question/Topic? 0
  • +

Page 1 of 1