Subversion Repositories SmartDukaan

Rev

Rev 7456 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
595 rajveer 1
$(document).ready(function(){
2
 
3
	/**
4
		Shipping Address page 
5
	*/
6
	if($("#shippingAddress").length){
7
 
8
		otherAddressCount 	= 0;
9
		lastContainerID 	= 0;
10
		lastAddressID		= 0;
11
 
12
		shippingAddressSetup();
13
	}
14
 
4148 rajveer 15
	$('#myaccountFormShippingAddress').validate({
16
		rules: {
17
			name: {
18
				required: true
19
			},
20
			line1: {
21
				required: true
22
			},
23
			state: {
24
				required: true
25
			},
26
			city: {
27
				required: true
28
			},
29
			pincode: {
30
				required: true,
31
				minlength: 6,
32
				maxlength: 6
33
			},
34
			phone: {
35
				required: true,
36
				minlength: 10,
37
				maxlength: 10
38
			}
39
		}
40
	});
595 rajveer 41
});
42
 
5746 anupam.sin 43
$(function() {
44
	var zone = 'All';
45
	$('#store-address-container').find('tr').each(function() {
46
		if($(this).hasClass('default-address')) {
47
			zone = $(this).attr('zone');
48
		}
49
	});
50
	$('#' + zone).attr('selected', true);
51
	$('#zone-selector').val(zone);
12570 amit.gupta 52
	showSpecificStores(false);
5746 anupam.sin 53
});
54
 
12570 amit.gupta 55
var showSpecificStores = function(callEvent) {
5746 anupam.sin 56
	//var rows = $(this).parents('#hotspot-address-heading').siblings('#store-address-container').find('tr');
57
	var index = 0;
58
	var rows = $('#store-address-container').find('tr');
59
	if($('#zone-selector').val() == 'All') {
60
		$(rows).show();
61
	} else {
62
		$(rows).hide();
63
		$(rows).each(function() {
64
			if($(this).attr('zone') == $('#zone-selector').val()) {
65
				index++;
66
				$(this).show();
67
			}
68
		});
69
	}
70
	if(index == 0) {
71
		var count = $(rows).length + " stores";
72
	} else if(index == 1) {
73
		var count = index + " store";
74
	} else {
5902 amit.gupta 75
		var count= index + " stores";
5746 anupam.sin 76
	}
12570 amit.gupta 77
	if(callEvent){
78
		trackEventWithGA("InStore Pickup Region", $('#zone-selector').val());
79
	}
5796 anupam.sin 80
	$('#store-address-header-text').html("&nbsp;Select a pickup point (<b>" + count + "</b> available)");
5746 anupam.sin 81
};
82
 
12570 amit.gupta 83
$("#zone-selector").change(showSpecificStores, true);
5746 anupam.sin 84
 
7456 amit.gupta 85
$(".unselected-tab").live('click', function() {
86
	var tabToBeSelected = $(this).attr('id');
5902 amit.gupta 87
	var deliveryType = "In-Store Pickup";
7456 amit.gupta 88
	if(tabToBeSelected == 'tab-left') {
5920 anupam.sin 89
		$('#inStoreLocationMsg').addClass('invisibleDiv');
7456 amit.gupta 90
		$("#tabSelector").val("myLocation");
5716 anupam.sin 91
		$('#tabSelectorForAddAddressForm').val('myLocation');
92
		$('#newAddressFormHeading').text("Enter the address where you want the items to be delivered");
5902 amit.gupta 93
		deliveryType = "Deliver to Address";
5716 anupam.sin 94
	} else {
5920 anupam.sin 95
		$('#inStoreLocationMsg').removeClass('invisibleDiv');
7456 amit.gupta 96
		$("#tabSelector").val("HotSpot");
5716 anupam.sin 97
		$('#tabSelectorForAddAddressForm').val('HotSpot');
98
		$('#newAddressFormHeading').text("Enter the address which you want printed on the bill");
99
	}
5902 amit.gupta 100
	trackEventWithGA('DeliveryType', deliveryType);
7456 amit.gupta 101
	$(this).removeClass('unselected-tab').addClass('selected-tab');
102
	$(this).siblings().removeClass('selected-tab').addClass('unselected-tab');
103
	var hiddenPane = $(this).parent().siblings('.hidden-div');
104
	$(this).parent().siblings().addClass('hidden-div');
105
	$(hiddenPane).removeClass('hidden-div');
5716 anupam.sin 106
});
107
 
108
$('.shipping-page-addresses .button-address-select').click(function(){
109
	var addressId = $(this).attr('id').split('_')[1];
110
	$('#formChangeAddressTo_' + addressId).submit();
111
});
112
 
113
$('.shipping-page-addresses .store-address-selector-button').click(function(){
114
	var addressId = $(this).attr('id').split('_')[1];
115
	$('#formChangeStoreAddressTo_' + addressId).submit();
116
});
117
 
118
$('.shipping-page-addresses .billing-address-selector-button').live('click', function(){
119
	var addressId = $(this).closest('tr').attr('id').split('_')[1];
120
	$('#addressid').val(addressId);
121
	var image = $(this).closest('tr').siblings('.default-address').find('img')[0];
122
	var previousAddress = $(this).closest('tr').siblings('.default-address').attr('id').split('_')[1];
123
	$(image).attr('id', 'selectAddress_' + previousAddress);
124
	$(image).attr('src', '/images/RadioButton_Unselected.png');
125
	$(image).attr('title', 'Select this Store for Shipment');
126
	$(image).removeClass('dummy-class');
127
	$(image).addClass('billing-address-selector-button');
128
	$(this).closest('tr').siblings('.default-address').removeClass('default-address');
129
	$('#tr_' + addressId).addClass('default-address');
130
	$(this).attr('src', '/images/RadioButton_Selected.png');
131
	$(this).addClass('dummy-class');
132
	$(this).removeClass('billing-address-selector-button');
133
});
134
 
135
 
136
 
137
$(document).ready(function(){
138
	$('.default-address').focus();
139
});
140
 
595 rajveer 141
/**
142
	Shipping Address page setup
143
*/
144
function shippingAddressSetup(){
145
 
146
	// Count no of other addresses for delete operation
147
	countOtherAddress();
148
 
149
	// Add Address button
150
	$("#shippingAddress input[name=addAddress1]").click(function(){
151
		addNewAddress();
152
	});
153
 
154
	$("#shippingAddress input[name=addAddress2]").click(function(){
155
		addNewAddress();
156
	});
157
 
158
 
159
	// Save and make primary address button
160
	$("#shippingAddress input[name=saveMakePriAddress]").click(function(){
161
		saveAddress('makePrimary');
162
	});
163
 
164
	// Save address button
165
	$("#shippingAddress input[name=saveAddress]").click(function(){
166
		saveAddress('save');
167
	});
168
 
169
	// Cancel address button
170
	$("#shippingAddress input[name=cancelAddress]").click(function(){
171
		resetShipingAddress();
172
	});
173
}
174
 
175
/**
176
	Count no. of other addresses
177
*/
178
function countOtherAddress(){
179
	var i 			= 0;
180
	var count 		= 2;
181
	var addressID 	= 0;
1048 chandransh 182
	var arrAddressID = [];
789 vikas 183
	var otherAddressCount = 0;
595 rajveer 184
 
789 vikas 185
	if ($("#shippingAddress #A1 div").attr("id") != undefined) {
186
		addressID = parseInt($("#shippingAddress #A1 div").attr("id").substr(7));
187
		arrAddressID.push(addressID);
188
	}
595 rajveer 189
 
1048 chandransh 190
	while(i === 0){
595 rajveer 191
		if($("#shippingAddress").find("#A" + count + ":visible").length == 1){
192
			addressID = parseInt($("#shippingAddress").find("#A" + count + " div").attr("id").substr(7));
193
			arrAddressID.push(addressID);
194
 
195
			otherAddressCount++;	// Count of other addresses
196
		}else{
197
			i = 1;
198
		}
199
 
200
		count++;
201
	}
202
 
203
	// sort address ids so that find the lastest address id
204
	for(i=0; i<arrAddressID.length; i++){
205
		for(j=i+1; j<arrAddressID.length; j++){
206
			if(arrAddressID[i] < arrAddressID[j]){
207
				temp = arrAddressID[i];
208
				arrAddressID[i] = arrAddressID[j];
209
				arrAddressID[j] = temp;
210
			}
211
		}
212
	}
213
 
214
	lastContainerID	= otherAddressCount + 1;	// last address container id
215
	lastAddressID 	= arrAddressID[0];			// last address id
216
}
217
 
218
/**
219
	Invoked on "Make Primary Address" btn click
220
*/
221
function makePriAddress(sourceId){
222
	ajaxMakePrimary(sourceId.substring(7,sourceId.length));
1048 chandransh 223
    var destId="";
224
    var destAddress="";
595 rajveer 225
	// if primary address is present then take backup of primary id and address
226
	if($(".noAddress1:visible").length != 1){
1048 chandransh 227
		destId 		= $("#A1 div").attr("id");
228
		destAddress = $("#" + destId + " .address").html();
595 rajveer 229
	}
230
 
231
	var sourceIdParentId 	= $("#" + sourceId).parent().attr("id");
232
	var sourceAddress 		= $("#" + sourceId + " .address").html();
233
 
234
	// if primary address is present then swap address
235
	if($(".noAddress1:visible").length != 1){
236
		// Replace destination Id and its content with source
237
		$("#A1 #" + destId).attr("id", sourceId);
238
		$("#A1 #" + sourceId + " .address").html(sourceAddress);
239
 
240
		// Replace primary address delete button parameter with source id
241
		var priDelBtn = "<input onclick=delAddress('" + sourceId + "') value='Delete' class='button' type='button' />";
858 vikas 242
		$("#A1 #" + sourceId + " .addressButton .imgDeleteButton").html("");
243
		$("#A1 #" + sourceId + " .addressButton .imgDeleteButton").html(priDelBtn);
595 rajveer 244
 
245
 
246
		// Replace source Id and its content with destination
247
		$("#" + sourceIdParentId + " #" + sourceId).attr("id", destId);
248
		$("#" + sourceIdParentId + " #" + destId + " .address").html(destAddress);
249
 
250
		// Replace other address primary button parameter with destination id
251
		var priBtn = "<input type='button' class='button' value='Make Primary Address' onClick=makePriAddress('" + destId + "') />";
858 vikas 252
		$("#" + sourceIdParentId + " #" + destId + " .addressButton .imgEnableButton").html("");
253
		$("#" + sourceIdParentId + " #" + destId + " .addressButton .imgEnableButton").html(priBtn);
595 rajveer 254
 
255
		// Replace other address delete button parameter with destination id
256
		var delBtn = "<input type='button' class='button' value='Delete' onClick=delAddress('" + destId + "') />";
858 vikas 257
		$("#" + sourceIdParentId + " #" + destId + " .addressButton .imgDeleteButton").html("");
258
		$("#" + sourceIdParentId + " #" + destId + " .addressButton .imgDeleteButton").html(delBtn);
595 rajveer 259
	}else{
260
		// if no primary address is present then add new primary address
261
		addNewPriAddress(sourceId, sourceAddress);
262
 
263
		// Delete clicked swapping other address
264
		removeOtherAddress(sourceIdParentId);
265
	}
266
}
267
 
268
/**
269
	Invoked on "Delete" btn click of both primary and other address
270
*/
271
function delAddress(sourceId){
272
	ajaxDeleteAddress(sourceId.substring(7,sourceId.length));
273
 
274
 
275
	var sourceIdParentId = $("#" + sourceId).parent().attr("id");
276
 
277
	// on delete of primary address
278
	if(sourceIdParentId == "A1"){
279
 
280
		$("#" + sourceIdParentId + " #" + sourceId + " .address").html("");
281
 
282
		// make first other address as primary address if available
1048 chandransh 283
		if(otherAddressCount === 0){
595 rajveer 284
			$("#" + sourceIdParentId).html("");
285
			$(".noAddress1").slideDown('slow');
286
		}else{
287
 
288
			// make first other address to primary and delete that
289
			var destId = $("#A1 div").attr("id");
290
 
1048 chandransh 291
			sourceIdParentId = $("#addressContainer div").attr("id");
595 rajveer 292
			sourceId = $("#" + sourceIdParentId + " div").attr("id");		
293
 
294
			var sourceAddress = $("#" + sourceId + " .address").html();
295
 
296
			// Replace destination Id and its content with source
297
			$("#A1 #" + destId).attr("id", sourceId);
298
			$("#A1 #" + sourceId + " .address").html(sourceAddress);
299
 
300
			// Replace primary address delete button parameter with source id
301
			var priDelBtn = "<input onclick=delAddress('" + sourceId + "') value='Delete' class='button' type='button' />";
302
			$("#A1 #" + sourceId + " .addressButton .imgDeleteButton .left .right").html("");
303
			$("#A1 #" + sourceId + " .addressButton .imgDeleteButton .left .right").html(priDelBtn);
304
 
305
			ajaxMakePrimary(sourceId.substring(7,sourceId.length));
306
			// Remove first other address
307
			removeOtherAddress(sourceIdParentId);
308
		}
309
	}else{
310
		removeOtherAddress(sourceIdParentId);
311
	}
312
}
313
 
314
/**
315
	Invoked from delAddress() function
316
*/
317
function removeOtherAddress(sourceIdParentId){
318
 
319
	$("#" + sourceIdParentId).slideUp('slow', function(){
320
		$(this).remove();
321
		otherAddressCount--;
322
 
1048 chandransh 323
		if(otherAddressCount === 0){
595 rajveer 324
			$(".noAddress2").slideDown('slow');
325
		}
326
	});
327
}
328
 
329
/**
330
	Invoked on "Save and make primary Address " & "Save" btn
331
*/
332
function saveAddress(str){
333
 
334
	// form validation
335
	var nameVal 	= jQuery.trim($("#shippingAddress #txtName").val());
336
	var add1Val 	= jQuery.trim($("#shippingAddress #txtAddress").val());
337
	var stateVal 	= $("#shippingAddress #state option:selected").val();
338
	var cityVal 	= $("#shippingAddress #txtCity").val();
339
	var pinCodeVal  = jQuery.trim($("#shippingAddress #txtPinCode").val());
340
	var phoneVal	= jQuery.trim($("#shippingAddress #txtPhone").val());
341
 
342
 
1048 chandransh 343
	if(nameVal.length === 0){
595 rajveer 344
		alert("Please enter name.");
345
 
346
		$("#shippingAddress #txtName").focus();
347
		return false;	
1048 chandransh 348
	}else if(add1Val.length === 0){
595 rajveer 349
		alert("Please enter address.");
350
 
351
		$("#shippingAddress #txtAddress").focus();
352
		return false;	
353
	}else if(stateVal == "0"){
354
		alert("Please select state.");
355
 
356
		$("#shippingAddress #state").focus();
357
		return false;	
1048 chandransh 358
	}else if(phoneVal.length === 0){
595 rajveer 359
		alert("Please enter phone no.");
360
 
361
		$("#shippingAddress #txtPhone").focus();
362
		return false;		
363
	}else if(pinCodeVal.length == 0){
364
		alert("Please enter pin code.");
365
 
366
		$("#shippingAddress #txtPinCode").focus();
367
		return false;	
368
	}else if(cityVal.length == 0){
369
		alert("Please enter city.");
370
 
371
		$("#shippingAddress #txtCity").focus();
372
		return false;	
373
	}else{
374
		if(str == "makePrimary"){
375
			addPriAddress();
376
		}else if(str == "save"){
377
			addOtherAddress("save", 0 , "");
378
		}
379
	}
380
 
381
	// Reset Form
382
	resetShipingAddress();
383
}
384
 
385
/**
386
	Invoke from saveAddress() function
387
*/
388
function addPriAddress(){
1048 chandransh 389
    var priAddressID = "";
390
    var priAddress = "";
595 rajveer 391
	// if primary address is present then take backup of primary id and address to make as first other id and address
392
	if($(".noAddress1:visible").length != 1){
1048 chandransh 393
		priAddressID 	= $("#A1 div").attr("id");
394
		priAddress	= $("#" + priAddressID + " .address").html();
595 rajveer 395
	}
396
 
397
	var priName 	= $("#shippingAddress #txtName").val();
398
	var priAdd1 	= $("#shippingAddress #txtAddress").val();
399
	var priAdd2 	= $("#shippingAddress #txtAddress2").val();
400
	var priCity 	= $("#shippingAddress #txtCity").val();
401
	var priPinCode 	= $("#shippingAddress #txtPinCode").val();
402
	var priState 	= $("#shippingAddress #state option:selected").val();
403
	var priPhone 	= $("#shippingAddress #txtPhone").val();
404
	var priEmail = "";
405
 
406
	var newPriAddressID	= "address" + (++lastAddressID);	// create new primary id to get newly inserted data from form	
407
 
1048 chandransh 408
	var newPriAddress = priName + "<br />" + priAdd1 + "<br />" + priAdd2 + "<br />" + priCity + "<br />" + priPinCode + "<br />" + priState + "<br /> Phone: " + priPhone ;
595 rajveer 409
 
410
	// if primary address is present then add new primary address and shift old primary address as first other address
411
	if($(".noAddress1:visible").length != 1){
412
		$("#A1 #" + priAddressID).attr("id", newPriAddressID);
413
		$("#A1 #" + newPriAddressID + " .address").html(newPriAddress);
414
 
415
		// Replace primary address delete button parameter with new primary id
416
		var priDelBtn = "<input onclick=delAddress('" + newPriAddressID + "') value='Delete' class='button' type='button' />";
417
		$("#A1 #" + newPriAddressID + " .addressButton .imgDeleteButton .left .right").html("");
418
		$("#A1 #" + newPriAddressID + " .addressButton .imgDeleteButton .left .right").html(priDelBtn);
419
 
420
		ajaxAddAddress("true", priName, priAdd1, priAdd2, priCity, priState, priPinCode, priPhone, priEmail);
421
 
422
		// shift old primary address to make first other address
423
		addOtherAddress("", priAddressID, priAddress);
424
	}else{
425
 
426
		// if no primary address is present then add new primary address
427
		addNewPriAddress(newPriAddressID, newPriAddress);
428
	}
429
}
430
 
431
/**
432
	Invoke from saveAddress(), addPriAddress() functions
433
 
434
	params:
435
		> condition = save	// for saving other address only
436
		> id 				// for old primary id
437
		> address 			// for old primary address
438
*/
439
function addOtherAddress(condition, id, address){
440
	var newContainerID 	= "A" + (++lastContainerID);
441
	var newAddressID	= (condition == "save") ? "address" + (++lastAddressID) : id;
442
	var container 		= "";
443
 
444
	if(condition == "save"){
445
		var otherName		= $("#shippingAddress #txtName").val();
446
		var otherAdd1 		= $("#shippingAddress #txtAddress").val();
447
		var otherAdd2 		= $("#shippingAddress #txtAddress2").val();
448
		var otherCity 		= $("#shippingAddress #txtCity").val();
449
		var otherPinCode 	= $("#shippingAddress #txtPinCode").val();
450
		var otherState 		= $("#shippingAddress #state option:selected").val();
451
		var otherPhone 	= $("#shippingAddress #txtPhone").val();
452
		var otherEmail = "";
453
		var otherAddress = otherName + "<br />" + otherAdd1 + "<br />" + otherAdd2 + "<br />" + otherCity + "<br />" + otherPinCode + "<br />" + otherState + "<br /> Phone: " + otherPhone;
454
 
455
		ajaxAddAddress("false", otherName, otherAdd1, otherAdd2, otherCity, otherState, otherPinCode, otherPhone, otherEmail);
456
 
457
	}else{
458
		otherAddress = address;
459
	}
460
 
461
	container = '<div id="' + newContainerID + '">';
462
		container += '	<div id="' + newAddressID + '">';
463
 
464
			if(condition == "save"){
465
				container += (otherAddressCount != 0) ? "<br /><br />" : "";
466
			}
467
 
468
			// Address
469
			container += '<div class="address">';
470
			container += otherAddress;
471
			container += '</div>';
472
 
473
			// Buttons
474
			container += '<div class="addressButton">';
475
 
476
				// Delete button
477
				container += '<div class="imgDeleteButton deleteWidth">';
478
				container += '	<div class="left">';
479
				container += '	<div class="right">';
480
				container += '		<input type="button" onclick="delAddress(\'' + newAddressID + '\');" value="Delete" class="button" />';
481
				container += '	</div>';
482
				container += '	</div>';
483
				container += '</div>';
484
 
485
				// Make primary address button
486
				container += '<div class="imgEnableButton priAddressWidth">';
487
				container += '		<div class="left">';
488
				container += '		<div class="right">';
489
				container += '			 <input type="button" onclick="makePriAddress(\'' + newAddressID + '\');" value="Make Primary Address" class="button" />';
490
				container += '		</div>';
491
				container += '		</div>';
492
				container += '</div>';
493
				container += '<div class="clearBoth"></div>';
494
 
495
			container += '</div>';
496
 
497
			if(condition != "save"){
498
				container += (otherAddressCount != 0)? "<br /><br />" : "";
499
			}
500
		container += '</div>';
501
	container += '</div>';
502
 
503
	if(condition == "save"){
504
		$("#addressContainer").append(container);	// to save other address
505
	}else{	
506
		$("#addressContainer").prepend(container);	// to save old primary address as first other address
507
	}
508
 
509
	if(otherAddressCount == 0){
510
		$(".noAddress2").hide();
511
	}
512
 
513
	otherAddressCount++;
514
 
515
 
516
}
517
 
518
 
519
/**
520
	Inovke from makePriAddress(), addPriAddress() function
521
*/
522
function addNewPriAddress(id, address){
523
 
524
	if($(".noAddress1:visible").length == 1){
525
		$(".noAddress1").hide();
526
	}
527
 
528
	var container = "";
529
	container = '<div id="' + id + '">';
530
 
531
		// Address
532
		container += '<div class="address">';
533
		container += address;
534
		container += '</div>';
535
 
536
		// Buttons
537
		container += '<div class="addressButton">';
538
		container += '	<div class="imgDeleteButton deleteWidth">';
539
		container += '		<div class="left"><div class="right">';
540
		container += '			<input type="button" class="button" value="Delete" onclick="delAddress(\'' + id + '\');">';
541
		container += '		</div></div>';
542
		container += '	</div>';
543
		container += '</div>';
544
 
545
	container += '</div>';
546
 
547
	$("#A1").append(container);
548
 
549
}
550
 
551
/**
552
	Add address for Shipping Address page
553
*/
554
function addNewAddress(){
555
	// Disable first addAddress button
556
	$("#addAddress1").removeClass('imgEnableButton').addClass('imgDisableButton');
557
	$("#addAddress1 input[name='addAddress1']").attr('disabled','disabled');
558
 
559
	// Hide second addAddress button
560
	$("#addAddress2").hide();
561
 
562
	// Show new address form
563
	$("#addNewAddress").show();
564
 
565
	$("#addNewAddress #txtName").focus();
566
}
567
 
568
/**
569
 * 
570
	Reset Shiping address for Shipping Address page
571
*/
572
function resetShipingAddress(){
573
	// Enable first addAddress button
574
	$("#addAddress1").removeClass('imgDisableButton').addClass('imgEnableButton');
575
	$("#addAddress1 input[disabled='']").removeAttr('disabled');
576
 
577
	// Show second addAddress button
578
	$("#addAddress2").show();
579
 
580
	// Hide add new address form
581
	$("#addNewAddress").hide();
582
 
583
	$("#shippingAddress #txtName").val("");
584
	$("#shippingAddress #txtAddress").val("");
585
	$("#shippingAddress #txtAddress2").val("");
586
	$("#shippingAddress #txtCity").val("");
587
	$("#shippingAddress #state option[value='0']").attr('selected', 'selected');
588
	$("#shippingAddress #txtPinCode").val("");
589
	$("#shippingAddress #txtPhone").val("");
590
}
591
 
592
 
593
function ajaxAddAddress(isprimary, name, add1, add2, city, state, pin, phone, email){
594
	jQuery.ajax({
595
		  type: "POST",
1919 rajveer 596
		  url: "/address",
595 rajveer 597
		  data: "action=add&default="+isprimary+"&name="+name+"&line1="+add1+"&line2="+add2+"&city="+city
598
		  +"&state="+state+"&pincode="+pin+"&phone="+phone+"&country=India",
599
		  success: function(msg){
600
		  }
601
	});
602
}
603
 
604
function ajaxMakePrimary(addressid){
605
	jQuery.ajax({
606
		  type: "POST",
1919 rajveer 607
		  url: "/address",
595 rajveer 608
		  data: "action=setdefault&addressid="+addressid,
609
		  success: function(msg){
610
		  }
611
	});
612
}
613
 
614
function ajaxDeleteAddress(addressid){
615
	jQuery.ajax({
616
		  type: "POST",
1919 rajveer 617
		  url: "/address",
595 rajveer 618
		  data: "action=delete&addressid="+addressid,
619
		  success: function(msg){
620
		  }
621
	});
1048 chandransh 622
}