Subversion Repositories SmartDukaan

Rev

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