Subversion Repositories SmartDukaan

Rev

Rev 12085 | Rev 13006 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 12085 Rev 12524
Line 389... Line 389...
389
    document.getElementById(Id).className += ' selected';
389
    document.getElementById(Id).className += ' selected';
390
    document.getElementById(Id).children[0].innerHTML = '-';
390
    document.getElementById(Id).children[0].innerHTML = '-';
391
    e.currentTarget.nextElementSibling.style.display = 'block';
391
    e.currentTarget.nextElementSibling.style.display = 'block';
392
    //document.getElementById(Id).style.display = 'block';
392
    //document.getElementById(Id).style.display = 'block';
393
    defaultPayment = e.currentTarget;
393
    defaultPayment = e.currentTarget;
394
    if(typeof _gaq != "undefined" && _gaq != null)  {
394
    /*if(typeof _gaq != "undefined" && _gaq != null)  {
395
      _gaq.push(['_trackEvent', 'Payment Option', 'Payment option tab clicked',title]);
395
      _gaq.push(['_trackEvent', 'Payment Option', 'Payment option tab clicked',title]);
396
    }
396
    }*/
-
 
397
	ga('send', 'event', 'Payment Option', 'Payment option tab clicked', title);
397
  }
398
  }
398
}
399
}
399
var previousDebit;
400
var previousDebit;
400
function selectDebitCard(e){
401
function selectDebitCard(e){
401
  
402
  
Line 409... Line 410...
409
  }
410
  }
410
  document.getElementById('pay-debit').value = Id;
411
  document.getElementById('pay-debit').value = Id;
411
  previousDebit = Id;
412
  previousDebit = Id;
412
  var title = e.currentTarget.getAttribute('data-parent');
413
  var title = e.currentTarget.getAttribute('data-parent');
413
  title = title+'-'+Id;
414
  title = title+'-'+Id;
-
 
415
/*
414
  if(typeof _gaq != "undefined" && _gaq != null)  {
416
  if(typeof _gaq != "undefined" && _gaq != null)  {
415
      _gaq.push(['_trackEvent', 'Payment Option', 'Payment option tab-payoption selected',title]);
417
      _gaq.push(['_trackEvent', 'Payment Option', 'Payment option tab-payoption selected',title]);
416
    }
418
    }
-
 
419
*/
-
 
420
	ga('send', 'event', 'Payment Option', 'Payment option tab-payoption selected', title);
417
}
421
}
418
var previousCard;
422
var previousCard;
419
function selectCard(e){
423
function selectCard(e){
420
  
424
  
421
  var Id = e.currentTarget.id;
425
  var Id = e.currentTarget.id;
Line 428... Line 432...
428
  }
432
  }
429
  document.getElementById('pay-credit').value = Id;
433
  document.getElementById('pay-credit').value = Id;
430
  previousCard = Id;
434
  previousCard = Id;
431
  var title = e.currentTarget.getAttribute('data-parent');
435
  var title = e.currentTarget.getAttribute('data-parent');
432
  title = title+'-'+Id;
436
  title = title+'-'+Id;
-
 
437
/*
433
  if(typeof _gaq != "undefined" && _gaq != null)  {
438
  if(typeof _gaq != "undefined" && _gaq != null)  {
434
      _gaq.push(['_trackEvent', 'Payment Option', 'Payment option tab-payoption selected',title]);
439
      _gaq.push(['_trackEvent', 'Payment Option', 'Payment option tab-payoption selected',title]);
435
    }
440
    }
-
 
441
*/
-
 
442
	ga('send', 'event', 'Payment Option', 'Payment option tab-payoption selected', title);
436
}
443
}
437
var netBankingInfo;
444
var netBankingInfo;
438
var prevClass;
445
var prevClass;
439
function changeNetBanking(e){
446
function changeNetBanking(e){
440
  
447
  
Line 469... Line 476...
469
  document.getElementById('pay-net').value = Id;
476
  document.getElementById('pay-net').value = Id;
470
  netBankingInfo = Id;
477
  netBankingInfo = Id;
471
  prevClass = e.currentTarget.className;
478
  prevClass = e.currentTarget.className;
472
  var title = e.currentTarget.getAttribute('data-parent');
479
  var title = e.currentTarget.getAttribute('data-parent');
473
  title = title+'-'+Id;
480
  title = title+'-'+Id;
-
 
481
/*
474
  if(typeof _gaq != "undefined" && _gaq != null)  {
482
  if(typeof _gaq != "undefined" && _gaq != null)  {
475
      _gaq.push(['_trackEvent', 'Payment Option', 'Payment option tab-payoption selected',title]);
483
      _gaq.push(['_trackEvent', 'Payment Option', 'Payment option tab-payoption selected',title]);
476
    }
484
    }
-
 
485
*/
-
 
486
	ga('send', 'event', 'Payment Option', 'Payment option tab-payoption selected', title);
477
}
487
}
478
function submitform(){
488
function submitform(){
479
    if(parseInt(document.getElementById('amountPayable').value) == 0 ){
489
    if(parseInt(document.getElementById('amountPayable').value) == 0 ){
480
      if(document.getElementById('captcha_response_box').value == ''){
490
      if(document.getElementById('captcha_response_box').value == ''){
481
        // document.forms['recharge-confirm'].submit();
491
        // document.forms['recharge-confirm'].submit();
Line 492... Line 502...
492
        return false;
502
        return false;
493
      }
503
      }
494
    }
504
    }
495
    var value = localStorage.getItem('rechargeValue');
505
    var value = localStorage.getItem('rechargeValue');
496
    if(parseInt(value) == 1){
506
    if(parseInt(value) == 1){
497
    	if(typeof _gaq != "undefined" && _gaq != null)	{
507
    	/*if(typeof _gaq != "undefined" && _gaq != null)	{
498
			_gaq.push(['_trackEvent', 'Recharge', 'Confirm','Mobile']);
508
			_gaq.push(['_trackEvent', 'Recharge', 'Confirm','Mobile']);
499
		}	
509
	  }*/	
-
 
510
	ga('send', 'event', 'Recharge', 'Confirm', 'Mobile');
500
    }else if(parseInt(value) == 2){
511
    }else if(parseInt(value) == 2){
501
    	if(typeof _gaq != "undefined" && _gaq != null)	{
512
    	/*if(typeof _gaq != "undefined" && _gaq != null)	{
502
			_gaq.push(['_trackEvent', 'Recharge', 'Confirm','DTH']);
513
		_gaq.push(['_trackEvent', 'Recharge', 'Confirm','DTH']);
503
		}
514
	}*/
-
 
515
	ga('send', 'event', 'Recharge', 'Confirm', 'DTH');
504
    }
516
    }
505
  }
517
  }
506
 function addressValidation(e){
518
 function addressValidation(e){
507
 	
519
 	
508
 	var Id = e.currentTarget.id;
520
 	var Id = e.currentTarget.id;
Line 700... Line 712...
700
        	window.scrollTo(0,0); return false;
712
        	window.scrollTo(0,0); return false;
701
        }	 
713
        }	 
702
	}
714
	}
703
	var value = localStorage.getItem('rechargeValue');
715
	var value = localStorage.getItem('rechargeValue');
704
    if(parseInt(value) == 1){
716
    if(parseInt(value) == 1){
705
    	if(typeof _gaq != "undefined" && _gaq != null)	{
717
    	/*if(typeof _gaq != "undefined" && _gaq != null)	{
706
			_gaq.push(['_trackEvent', 'Recharge', 'Pay Now','Mobile']);
718
		_gaq.push(['_trackEvent', 'Recharge', 'Pay Now','Mobile']);
707
		}
719
	}*/
-
 
720
	ga('send', 'event', 'Recharge', 'Pay Now', 'Mobile');
708
    }else if(parseInt(value) == 2){
721
    }else if(parseInt(value) == 2){
709
    	if(typeof _gaq != "undefined" && _gaq != null)	{
722
    	/*if(typeof _gaq != "undefined" && _gaq != null)	{
710
			_gaq.push(['_trackEvent', 'Recharge', 'Pay Now','DTH']);
723
		_gaq.push(['_trackEvent', 'Recharge', 'Pay Now','DTH']);
711
		}
724
	}*/
-
 
725
	ga('send', 'event', 'Recharge', 'Pay Now', 'DTH');
712
    }
726
    }
713
 }
727
 }
714
 var url;
728
 var url;
715
 url = document.URL;
729
 url = document.URL;
716
 if(url.indexOf('recharge-result') != -1){
730
 if(url.indexOf('recharge-result') != -1){