Subversion Repositories SmartDukaan

Rev

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

Rev 1290 Rev 1297
Line 13... Line 13...
13
		switch(parseInt($(this).val()))	{
13
		switch(parseInt($(this).val()))	{
14
 
14
 
15
			case 1:
15
			case 1:
16
				$('#orderComponent, #productComponent, #subjectComponent, #msgComponent').show();
16
				$('#orderComponent, #productComponent, #subjectComponent, #msgComponent').show();
17
				$('#lblSubject').html('Reason to Return');
17
				$('#lblSubject').html('Reason to Return');
-
 
18
				$('#reason_to_return').attr('name', 'subject').show();
-
 
19
				$('#delivery_problem, #subject').removeAttr('name').hide();
18
				break;
20
				break;
19
 
21
 
20
			case 2:
22
			case 2:
21
				$('#orderComponent, #subjectComponent, #msgComponent').show();
23
				$('#orderComponent, #subjectComponent, #msgComponent').show();
22
				$('#lblSubject').html('Reason for Cancellation');
24
				$('#lblSubject').html('Reason for Cancellation');
-
 
25
				$('#subject').attr('name', 'subject').show();
-
 
26
				$('#delivery_problem, #reason_to_return').removeAttr('name').hide();
23
				break;
27
				break;
24
 
28
 
25
			case 3:
29
			case 3:
26
				$('#orderComponent, #subjectComponent, #msgComponent').show();
30
				$('#orderComponent, #subjectComponent, #msgComponent').show();
27
				$('#lblSubject').html('Problem Type');
31
				$('#lblSubject').html('Problem Type');
-
 
32
				$('#delivery_problem').attr('name', 'subject').show();
-
 
33
				$('#reason_to_return, #subject').removeAttr('name').hide();
28
				break;
34
				break;
29
 
35
 
30
			case 4:
36
			case 4:
31
				$('#orderComponent, #msgComponent').show();
37
				$('#orderComponent, #msgComponent').show();
32
				break;
38
				break;
Line 41... Line 47...
41
				break;
47
				break;
42
 
48
 
43
			case 7:
49
			case 7:
44
				$('#orderComponent, #msgComponent').show();
50
				$('#orderComponent, #msgComponent').show();
45
				$('#lblSubject').html('Subject');
51
				$('#lblSubject').html('Subject');
-
 
52
				$('#subject').attr('name', 'subject').show();
-
 
53
				$('#delivery_problem, #reason_to_return').removeAttr('name').hide();
46
				break;
54
				break;
47
 
55
 
48
			default:
56
			default:
49
				$('#orderComponent, #awbComponent, #productComponent, #subjectComponent, #msgComponent').hide();
57
				$('#orderComponent, #awbComponent, #productComponent, #subjectComponent, #msgComponent').hide();
50
				break;
58
				break;
51
		}
59
		}
52
	});
60
	});
-
 
61
	
-
 
62
	$('#order_id').change(function(){
-
 
63
		var orderId = parseInt($(this).val());
-
 
64
 
-
 
65
		if(isNaN(orderId))	{
-
 
66
			alert("Order Id must be an integer");
-
 
67
		} else	{
-
 
68
			jQuery.ajax({
-
 
69
				type: "GET",
-
 
70
				url: "/contact-us/" + orderId + "",
-
 
71
				success: function(data)	{
-
 
72
					$("#product").html(data);
-
 
73
				}
-
 
74
			});
-
 
75
		}
-
 
76
	});
53
 
77
 
54
  function scrollWin(){
78
  function scrollWin(){
55
    $('html, body').animate({
79
    $('html, body').animate({
56
      scrollTop: $("#newShipAdr").offset().top
80
      scrollTop: $("#newShipAdr").offset().top
57
    }, 2000);
81
    }, 2000);