-
Notifications
You must be signed in to change notification settings - Fork 1
/
matchInputPost.js
40 lines (34 loc) · 1.43 KB
/
matchInputPost.js
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
function postwith(to){
var nums = {
'userName' : document.getElementById('userName').value,
'matchNum' : document.getElementById('matchNum').value,
'teamNum' : document.getElementById('teamNum').value,
'allianceColor' : document.getElementById('allianceColor').value,
'autoPath' : JSON.stringify(coordinateList),
'crossLineA' : document.getElementById('crossLineA').checked?1:0,
'upperGoal' : upperGoal,
'upperGoalMiss' : upperGoalMiss,
'lowerGoal' : lowerGoal,
'lowerGoalMiss' : lowerGoalMiss,
'upperGoalT' : upperGoalT,
'upperGoalMissT' : upperGoalT,
'lowerGoalT' : lowerGoalT,
'lowerGoalMissT' : lowerGoalMissT,
'controlPanelPosT' : controlPanelPosT,
'controlPanelNumT' : controlPanelNumT,
'climb' : climb,
'climbTwo' : climbTwo,
'climbThree' : climbThree,
'climbCenter' : document.getElementById('climbCenter').checked?1:0,
'climbSide' : document.getElementById('climbSide').checked?1:0,
'issues' : document.getElementById('issues').value,
'defenseBot' : document.getElementById('defenseBot').checked?1:0,
'defenseComments' : document.getElementById('defenseComments').value,
'matchComments' : document.getElementById('matchComments').value
};
var id = document.getElementById('matchNum').value + "-" + document.getElementById('teamNum').value;
console.log(JSON.stringify(nums));
orangePersist.collection("avr").doc(id).set(nums);
$.post( "dataHandler.php", nums).done(function( data ) {
});
}