-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.html
67 lines (50 loc) · 1.91 KB
/
test.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
<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<script type="text/javascript">
function changePage() {
var index = document.getElementById("selectBox").selectedIndex;
var theForm = document.getElementById("theForm");
theForm.action = document.getElementsByTagName("option")[index].value;
}
</script>
<html>
<head>
<title>Select Firmware Version</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<form id="theForm" action="/no page slected"><br>
this form should have action= "/httpUpdate"<br>
<br>
if (request->hasParam("UpdateURL", true)) {<br>
URL = request->getParam("UpdateURL", true)->value();<br>
if URL == nonSelected"<br>
request->Send the previos page.<br>
else<br>
t_httpUpdate_return ret = httpUpdate.update(client, UpdateURL);<br>
}<br>
I did this wrong I need to Post the url<br>
need a way for if no option is selected it does nothing<br>
need to figure out how to generate the options with arduino.<br>
1.get json. <br>
2. write fixed size loop (because json is fixed size)<br>
3. server.on(/httpupdate <br>
OR
<select id = "selectBox" onChange="changePage()" >
<option selected value="--">--</option>
<option value="saab">Saab</option>
<option value="opel">Opel</option>
<option value="audi">Audi</option>
<option value="https://www.yahoo.com/" >Option1</option>
<option value="https://www.google.co.in/">Option2</option>
<option value="https://www.gmail.com/">Option3</option>
</select>
<br><br>
<input type="submit" value="Submit">
</form>
</body>
</html>