File tree 4 files changed +29
-5
lines changed
4 files changed +29
-5
lines changed Original file line number Diff line number Diff line change 64
64
box-shadow : 0 0px # 005c5f ;
65
65
}
66
66
</ style >
67
+ < script type ='text/javascript '>
68
+ function submit ( ) {
69
+ var ssid = document . getElementById ( 'ssid' ) . value ;
70
+ var password = document . getElementById ( 'password' ) . value ;
71
+
72
+ if ( ssid . length === 0 ) {
73
+ alert ( 'Please enter an SSID' ) ;
74
+ return ;
75
+ }
76
+
77
+ var body = 'login=' + escape ( ssid ) + '&password=' + escape ( password ) + '&device-name=&connect=Connect' ;
78
+
79
+ var xhr = ( window . XMLHttpRequest ) ? new XMLHttpRequest ( ) : new ActiveXObject ( 'Microsoft.XMLHTTP' ) ;
80
+
81
+ xhr . onreadystatechange = function ( ) {
82
+ if ( this . readyState === 4 ) {
83
+ window . close ( ) ;
84
+ }
85
+ } ;
86
+
87
+ xhr . open ( 'POST' , '/' , true ) ;
88
+ xhr . send ( body ) ;
89
+ }
90
+ </ script >
67
91
</ head >
68
92
< body >
69
93
< div id ='pagelogo '>
111
135
</ div >
112
136
< div id ="log-in-form-container ">
113
137
< div id ='text '>
114
- < form id =" form-holder " method =" post " action ="" >
138
+ < div >
115
139
SSID:< br >
116
- < input type ="text " name ="login " value ="" maxlength ="32 "> < br >
140
+ < input id =" ssid " type ="text " name ="login " value ="" maxlength ="32 "> < br >
117
141
PASSWORD:< br >
118
- < input type ="password " name ="password " value ="" maxlength ="64 "> < br >
142
+ < input id =" password " type ="password " name ="password " value ="" maxlength ="64 "> < br >
119
143
< input type ="hidden " name ="device-name " value ="" maxlength ="48 ">
120
- < input type ="submit " name ="connect " value ="Connect " class ="button ">
121
- </ form >
144
+ < input type ="button " name ="connect " value ="Connect " class ="button " onclick =" submit(); ">
145
+ </ div >
122
146
< br >
123
147
< p > Please enter your WiFi network credentials.
124
148
< br > Then the board will attempt to connect to your WiFi network.</ br >
You can’t perform that action at this time.
0 commit comments