-
Notifications
You must be signed in to change notification settings - Fork 1
/
primaryMatchInputPost.js
29 lines (23 loc) · 1.06 KB
/
primaryMatchInputPost.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
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,
'upperGoal': upperGoal,
'upperGoalMiss': upperGoalMiss,
'lowerGoal': lowerGoal,
'upperGoalT': upperGoalT,
'upperGoalMissT': upperGoalMissT,
'lowerGoalT': lowerGoalT,
'controlPanelPosT': document.getElementById('controlPanelPosT').checked ? 1 : 0,
'controlPanelNumT': document.getElementById('controlPanelNumT').checked ? 1 : 0,
'matchComments': document.getElementById('matchComments').value,
'cycleNumber': cycleNumber
};
var id = document.getElementById('matchNum').value + "-" + document.getElementById('teamNum').value;
console.log(JSON.stringify(nums));
orangePersist.collection("avr").doc(id).set(nums);
$.post( "primaryDataHandler.php", nums).done(function( data ) {
});
}