File tree Expand file tree Collapse file tree 1 file changed +16
-10
lines changed Expand file tree Collapse file tree 1 file changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -28,16 +28,22 @@ <h1>WebGSM</h1>
2828 < p id ="download-status "> </ p >
2929 </ div >
3030
31- < script >
32- // When the download button is clicked
33- $ ( '#download-button' ) . click ( function ( ) {
34- // Send an AJAX request to start the download process
35- $ . get ( '/start-download' , function ( data ) {
36- $ ( '#download-status' ) . text ( data . message ) ;
37- } ) . fail ( function ( error ) {
38- $ ( '#download-status' ) . text ( "Error starting the download." ) ;
31+ < script >
32+ // When the download button is clicked
33+ $ ( '#download-button' ) . click ( function ( ) {
34+ // Send an AJAX request to start the download process
35+ $ . get ( '/start-download' , function ( data ) {
36+ $ ( '#download-status' ) . text ( data . message ) ;
37+
38+ // Add a 3-second delay before refreshing the page
39+ setTimeout ( function ( ) {
40+ location . reload ( ) ; // Refresh the page
41+ } , 3000 ) ; // 3000 milliseconds = 3 seconds
42+ } ) . fail ( function ( error ) {
43+ $ ( '#download-status' ) . text ( "Error starting the download." ) ;
44+ } ) ;
3945 } ) ;
40- } ) ;
41- </ script >
46+ </ script >
47+
4248</ body >
4349</ html >
You can’t perform that action at this time.
0 commit comments