There are couple of issues
1. Not sure if the copy paste issue, somehow the markup is missing "</fieldset>" and there is a </script> tag on top of Category but missing beginning tag and body.
2. I don't see any where in the code that doing the redirect, try
window.location.href
to redirect to a different location.
function chooseCategory() {
switch (document.getElementById("selectcategory").value) {
case "individual":
window.location.href = "https://www.w3schools.com";
break;
case "team":
window.location.href = "index.html";
break;
case "company":
window.location.href = "index.html";
break;
}
}
3. Change the input type submit to button, seem like you just want the code to redirect to different page based on the dropdown selection and not posting anything to the server
<input type="button" name="sub" value="Share your idea" onclick="chooseCategory()">