-
Notifications
You must be signed in to change notification settings - Fork 0
/
feedback.html
185 lines (168 loc) · 6.17 KB
/
feedback.html
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Resistive cicuit Solver</title>
<link href="https://fonts.googleapis.com/css2?family=PT+Sans:wght@700&display=swap" rel="stylesheet" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css" />
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z"
crossorigin="anonymous" />
<link rel="stylesheet" href="stylesNew.css" />
<link rel="preconnect" href="https://fonts.gstatic.com" />
<link rel="icon" href="images/icon/microchip.png" type="image/icon type">
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark">
<a class="navbar-brand" href="index.html">Resistive circuit solver</a>
<button
class="navbar-toggler"
type="button"
data-toggle="collapse"
data-target="#navbarSupportedContent"
aria-controls="navbarSupportedContent"
aria-expanded="false"
aria-label="Toggle navigation"
>
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a
class="nav-link"
type="button"
data-toggle="modal"
data-target="#staticBackdrop"
>Docs</a
>
</li>
<li class="nav-item">
<a class="nav-link" href="contact.html">Contact</a>
</li>
<li class="nav-item">
<a class="nav-link" href="feedback.html">Feedback</a>
</li>
</ul>
</div>
</nav>
<div id="alerts">
</div>
<div class="feedback " style="padding-top: 5rem">
<h2 style="color: white">Feedback</h2>
<form name="submit-to-google-sheet" style="padding-top: 2rem">
<div class="form-group">
<label style="color: white" for="name">Name</label>
<input
type="text"
class="form-control"
id="full_name"
aria-describedby="emailHelp"
name="firstNname"
/>
</div>
<div class="form-group">
<label style="color: white" for="mail">Email Address:</label>
<input type="email" class="form-control" id="mail" name="email" />
<small id="emailHelp" class="form-text text-muted"
>We'll never share your email with anyone else.</small
>
</div>
<div class="form-group">
<label style="color: white" for="message">Message</label>
<input type="text" class="form-control" id="message" name="message" />
</div>
<button class="btn btn-primary" style="margin-top: 2rem">
Submit
</button>
</form>
<!-- Modal -->
</div>
<div
class="modal fade docs-popup"
id="staticBackdrop"
data-backdrop="static"
data-keyboard="false"
tabindex="-1"
aria-labelledby="staticBackdropLabel"
aria-hidden="true"
>
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="staticBackdropLabel">Instructions</h5>
<button
type="button"
class="close"
data-dismiss="modal"
aria-label="Close"
>
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<ol>
1. Please make the number of nodes on your own and, enter the
number of nodes excluding the reference node. (External Tip: Make
the node that has more number of elements connected to it as the
reference node)
</ol>
<ol>
2. Also count all the elements in the given circuit and enter it.
</ol>
<ol>
3. Now choose the elements that are present in the circuit from
the dropdown menu.
</ol>
<ol>
4. Once this is done, start entering the requested values for each
element abiding to the passive sign convention, a picture as a
helping hand is shown for each of the element. Don't make any
mistake in this, then the resuls might not be define or it can be
wrong.
</ol>
<ol>
5. After ensuring all the entered values are correct, hit the
submit button and you are done the answer now pops up.
</ol>
</div>
<div class="modal-footer">
<button
type="button"
class="btn btn-secondary"
data-dismiss="modal"
>
Close
</button>
</div>
</div>
</div>
<script>
const scriptURL = 'https://script.google.com/macros/s/AKfycbxOpzz9BUueI5Pd_YXib8wkUwpiWG-IRVII-iyNcFV3BUWvj7IS/exec'
const form = document.forms['submit-to-google-sheet']
form.addEventListener('submit', e => {
var aler = document.createElement("div")
aler.setAttribute("class", "alert alert-info ")
aler.setAttribute("role", "alert")
aler.setAttribute("id", "wait-alert")
aler.innerHTML = "Please Wait"
document.getElementById('alerts').appendChild(aler)
e.preventDefault()
fetch(scriptURL, { method: 'POST', body: new FormData(form)})
.then(response => {
var myobj = document.getElementById("wait-alert");
myobj.remove();
alert("Success");
})
.catch(error => {
var myobj = document.getElementById("wait-alert");
myobj.remove();
alert("Failed" + error.message);
})
})
</script>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-w1Q4orYjBQndcko6MimVbzY0tgp4pWB4lZ7lr30WKz0vr/aWKhXdBNmNb5D92v7s" crossorigin="anonymous"></script>
</body>
</html>