Added registration screen script to footer
This commit is contained in:
@@ -32,45 +32,4 @@
|
||||
</form>
|
||||
<p class="mt-3">Already have an account? <a href="/login">Login</a></p>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
console.log("Hello");
|
||||
const league_select = document.getElementById('league_dropdown');
|
||||
const team_select = document.getElementById('team_dropdown');
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
|
||||
league_select.addEventListener('change', updateTeamSelect);
|
||||
|
||||
function updateTeamSelect() {
|
||||
var selectedLeague = league_select.value;
|
||||
|
||||
team_select.innerHTML = "";
|
||||
console.log(selectedLeague);
|
||||
// Add options based on the selected value from the first select element
|
||||
if (selectedLeague === "La Liga") {
|
||||
// Add options for La Liga
|
||||
console.log("Hello");
|
||||
|
||||
addOption(team_select, "Option 1 for LL", "option1A");
|
||||
addOption(team_select, "Option 2 for LL", "option2A");
|
||||
} else if (selectedLeague === "Serie A") {
|
||||
// Add options for Serie A
|
||||
addOption(team_select, "Team 1 in Serie A", "option1B");
|
||||
addOption(team_select, "Team 2 in Serie A", "option2B");
|
||||
} else if (selectedLeague === "Bundesliga") {
|
||||
// Add options for Bundesliga
|
||||
addOption(team_select, "Option 1 for Bun", "option1C");
|
||||
addOption(team_select, "Option 2 for Bun", "option2C");
|
||||
}
|
||||
}
|
||||
|
||||
function addOption(selectElement, text, value) {
|
||||
var option = document.createElement("option");
|
||||
option.text = text;
|
||||
option.value = value;
|
||||
selectElement.add(option);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
© 2024 - CSCI 3308 Group 6
|
||||
</p>
|
||||
|
||||
<!-- Registration Page Scripts -->
|
||||
<script src="js/registration/selectFunctions.js"></script>
|
||||
|
||||
<!-- Navigation Bar Scripts -->
|
||||
<script src="js/navigation-bar/navigation-bar-follow.js"></script>
|
||||
<script src="js/navigation-bar/user/login.js"></script>
|
||||
|
||||
Reference in New Issue
Block a user