Subversion Repositories SmartDukaan

Rev

Rev 8018 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8018 Rev 11652
Line 17... Line 17...
17
        </div>
17
        </div>
18
		#end
18
		#end
19
		Saholic wallet balance (with MobiSoc) is : INR $action.getSaholicRechargeBalance()<br>
19
		Saholic wallet balance (with MobiSoc) is : INR $action.getSaholicRechargeBalance()<br>
20
		Spice Retail Current wallet balance is : INR $action.getWalletBalance(1)<br>
20
		Spice Retail Current wallet balance is : INR $action.getWalletBalance(1)<br>
21
		Spice Online Retail Current wallet balance is : INR $action.getWalletBalance(2)
21
		Spice Online Retail Current wallet balance is : INR $action.getWalletBalance(2)
22
		<form name="recharge-topup" action="$request.getContextPath()/recharge-topup/" method="post"">
22
		<form id="recharge-topup" name="recharge-topup" action="" method="post"">
23
			<table>
23
			<table>
24
				<tr>
24
				<tr>
25
					<td>Company:</td>
25
					<td>Company:</td>
26
					<td>
26
					<td>
27
						<select name="companyId">
27
						<select id="companyId" name="companyId">
28
                            <option value="1" selected>Spice Retail Ltd</option>
28
                            <option value="1" selected>Spice Retail Ltd</option>
29
							<option value="2">Spice Online Retail Pvt Ltd</option>
29
							<option value="2">Spice Online Retail Pvt Ltd</option>
30
						</select>
30
						</select>
31
					</td>
31
					</td>
32
				</tr>
32
				</tr>
33
				<tr>
33
				<tr>
34
					<td>Amount:</td>
34
					<td>Amount:</td>
35
					<td>
35
					<td>
36
						<input name="amount" type="text"/>
36
						<input id="amount" name="amount" type="text"/>
37
					</td>
37
					</td>
38
				</tr>
38
				</tr>
39
				<tr>
39
				<tr>
40
					<td>&nbsp;</td>
40
					<td>&nbsp;</td>
41
					<td><input type="submit" value="Add amount"/></td>
41
					<td><input type="submit" value="Add amount"/></td>
Line 47... Line 47...
47
		<br />
47
		<br />
48
		<br />
48
		<br />
49
		<br />
49
		<br />
50
		
50
		
51
	</body>
51
	</body>
-
 
52
<script type="text/javascript">
-
 
53
$("#recharge-topup").live('submit', function(){
-
 
54
	var amt = $('#amount').val();
-
 
55
	var cmp = $( "#companyId option:selected" ).text();
-
 
56
	if (amt==isNaN(amt) || amt==null || amt==""){
-
 
57
		alert("Empty amount.");
-
 
58
		return false;
-
 
59
	}
-
 
60
	if(!confirm("Adding amount "+amt+" to "+cmp)){
-
 
61
		return false;
-
 
62
	}
-
 
63
	var data = $(this).serialize();
-
 
64
    jQuery.ajax({
-
 
65
        url: "/Support/recharge-topup",
-
 
66
        type: 'POST',
-
 
67
        data: data,
-
 
68
        async: false,
-
 
69
        success: function (data) {
-
 
70
			$('#recharge-topup')[0].reset();
-
 
71
		},
-
 
72
		error : function() {
-
 
73
		 	alert("OOPS!!!Failed to do changes.Try Again.");
-
 
74
			$('#recharge-topup')[0].reset();
-
 
75
		 },
-
 
76
        cache: false,
-
 
77
        contentType: "application/x-www-form-urlencoded",
-
 
78
        processData: false
-
 
79
    });
-
 
80
	location.reload();
-
 
81
    return false;
-
 
82
	});
-
 
83
</script>
52
</html>
84
</html>
53
85