-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
88 lines (76 loc) · 2.53 KB
/
script.js
File metadata and controls
88 lines (76 loc) · 2.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
var i = 0;
var j =0;
var k =0;
var l =0;
function disable() {
document.getElementById("vote1").disabled = true;
document.getElementById("vote2").disabled = true;
document.getElementById("vote3").disabled = true;
document.getElementById("vote4").disabled = true;
}
function incrementValue()
{
document.getElementById('vote1').value = ++i;
console.log(i)
alert('vote submited to MOdiji');
disable()
}
function incv3(){
document.getElementById('vote3').value = ++k;
console.log(k)
alert('vote submited to sarad');
disable()
}
function incv2(){
document.getElementById('vote2').value = ++j;
console.log(j)
alert('vote submited to Rahul');
disable()
}
function incv4(){
document.getElementById('vote4').value = ++j;
console.log(j)
alert('vote submited to uddav');
disable()
}
// $(document).ready(function() {
// $('.modal').modal();
// function disable() {
// $('#vote1').addClass( "disabled" );
// $('#vote2').addClass( "disabled" );
// $('#vote3').addClass( "disabled" );
// $('#vote4').addClass( "disabled" );
// //logout
// document.cookie = "show=John Doe; expires=Thu, 18 Dec 2013 12:00:00 UTC";
// document.cookie = "aadhaar=John Doe; expires=Thu, 18 Dec 2013 12:00:00 UTC";
// window.location = '/app';
// }
// $('#vote1').click(function(){
// contractInstance.voteForCandidate('Sanat', {from: web3.eth.accounts[0]}, function() {
// alert('vote submited to Sanat');
// disable();
// $('#loc_info').text('Vote submited successfully to Sanat')
// });
// })
// $('#vote2').click(function(){
// contractInstance.voteForCandidate('Aniket', {from: web3.eth.accounts[0]}, function() {
// alert('vote submited to Aniket');
// disable();
// $('#loc_info').text('Vote submited successfully to Aniket')
// });
// })
// $('#vote3').click(function(){
// contractInstance.voteForCandidate('Mandar', {from: web3.eth.accounts[0]}, function() {
// alert('vote submited to Mandar');
// disable();
// $('#loc_info').text('Vote submited successfully to Mandar')
// });
// })
// $('#vote4').click(function(){
// contractInstance.voteForCandidate('Akshay', {from: web3.eth.accounts[0]}, function() {
// alert('vote submited to Akshay');
// disable();
// $('#loc_info').text('Vote submited successfully to Akshay')
// });
// })
// })