I have my javascript code but when I go onto my website, using the html, css and javascript the upload button, wont work in the file part for my website witch for my website I really need the proper javascript code, to make the upload button work so I can upload files or folders into the file part.
here is my html code
<code><html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dragon Host</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header>
<h1>Dragon Host</h1>
<p class="fun-fact">Fun Fact: Host your Discord bots on Dragon Host!</p>
<nav>
<ul>
<li><a href="#" id="toggle-console">Console</a></li>
<li><a href="#" id="toggle-files">Files</a></li>
<li><a href="#">Databases</a></li>
<li><a href="#">Schedules</a></li>
<li><a href="#">Users</a></li>
<li><a href="#">Backups</a></li>
<li><a href="#">Network</a></li>
<li><a href="#">Startup</a></li>
<li><a href="#">Settings</a></li>
</ul>
</nav>
</header>
<main>
<div id="console" class="hidden">
<h2>Console</h2>
<div class="console-controls">
<input type="text" id="command-input" placeholder="Enter command...">
<button id="submitCommandButton">Submit</button>
</div>
<div class="console-output" id="console-output">
<!-- Console output goes here -->
</div>
</div>
<div id="files" class="hidden">
<h2>Files</h2>
<div class="file-controls">
<input type="file" id="file-input" multiple style="display: none;">
<button onclick="chooseFiles()">Upload</button>
<button onclick="createFolder()">Create Folder</button>
<button onclick="createFile()">Create File</button>
</div>
<div class="file-list">
<!-- File selection area -->
</div>
</div>
</main>
<footer>
<p>© 2024 Dragon Host</p>
</footer>
<script src="scripts.js"></script>
</body>
</html>
in my javascript code when I pressed the upload button it would not do anything, I want it so when I press it, it makes it so I can upload files or folders into the website. But I don't really understand javascript that much, because it is really complex, Someone please help me.
</code>
<code><html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dragon Host</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header>
<h1>Dragon Host</h1>
<p class="fun-fact">Fun Fact: Host your Discord bots on Dragon Host!</p>
<nav>
<ul>
<li><a href="#" id="toggle-console">Console</a></li>
<li><a href="#" id="toggle-files">Files</a></li>
<li><a href="#">Databases</a></li>
<li><a href="#">Schedules</a></li>
<li><a href="#">Users</a></li>
<li><a href="#">Backups</a></li>
<li><a href="#">Network</a></li>
<li><a href="#">Startup</a></li>
<li><a href="#">Settings</a></li>
</ul>
</nav>
</header>
<main>
<div id="console" class="hidden">
<h2>Console</h2>
<div class="console-controls">
<input type="text" id="command-input" placeholder="Enter command...">
<button id="submitCommandButton">Submit</button>
</div>
<div class="console-output" id="console-output">
<!-- Console output goes here -->
</div>
</div>
<div id="files" class="hidden">
<h2>Files</h2>
<div class="file-controls">
<input type="file" id="file-input" multiple style="display: none;">
<button onclick="chooseFiles()">Upload</button>
<button onclick="createFolder()">Create Folder</button>
<button onclick="createFile()">Create File</button>
</div>
<div class="file-list">
<!-- File selection area -->
</div>
</div>
</main>
<footer>
<p>© 2024 Dragon Host</p>
</footer>
<script src="scripts.js"></script>
</body>
</html>
in my javascript code when I pressed the upload button it would not do anything, I want it so when I press it, it makes it so I can upload files or folders into the website. But I don't really understand javascript that much, because it is really complex, Someone please help me.
</code>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dragon Host</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header>
<h1>Dragon Host</h1>
<p class="fun-fact">Fun Fact: Host your Discord bots on Dragon Host!</p>
<nav>
<ul>
<li><a href="#" id="toggle-console">Console</a></li>
<li><a href="#" id="toggle-files">Files</a></li>
<li><a href="#">Databases</a></li>
<li><a href="#">Schedules</a></li>
<li><a href="#">Users</a></li>
<li><a href="#">Backups</a></li>
<li><a href="#">Network</a></li>
<li><a href="#">Startup</a></li>
<li><a href="#">Settings</a></li>
</ul>
</nav>
</header>
<main>
<div id="console" class="hidden">
<h2>Console</h2>
<div class="console-controls">
<input type="text" id="command-input" placeholder="Enter command...">
<button id="submitCommandButton">Submit</button>
</div>
<div class="console-output" id="console-output">
<!-- Console output goes here -->
</div>
</div>
<div id="files" class="hidden">
<h2>Files</h2>
<div class="file-controls">
<input type="file" id="file-input" multiple style="display: none;">
<button onclick="chooseFiles()">Upload</button>
<button onclick="createFolder()">Create Folder</button>
<button onclick="createFile()">Create File</button>
</div>
<div class="file-list">
<!-- File selection area -->
</div>
</div>
</main>
<footer>
<p>© 2024 Dragon Host</p>
</footer>
<script src="scripts.js"></script>
</body>
</html>
in my javascript code when I pressed the upload button it would not do anything, I want it so when I press it, it makes it so I can upload files or folders into the website. But I don't really understand javascript that much, because it is really complex, Someone please help me.
New contributor
Jacob McGrilled is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
4