dschandra commited on
Commit
ae99e32
·
verified ·
1 Parent(s): 3b61118

Create js/script.js

Browse files
Files changed (1) hide show
  1. static/js/script.js +13 -0
static/js/script.js ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // static/js/script.js
2
+ document.addEventListener('DOMContentLoaded', () => {
3
+ const form = document.querySelector('form');
4
+ if (form) {
5
+ form.addEventListener('submit', (e) => {
6
+ const fileInput = document.querySelector('input[type="file"]');
7
+ if (!fileInput.files.length) {
8
+ e.preventDefault();
9
+ alert('Please select a video file.');
10
+ }
11
+ });
12
+ }
13
+ });