I'm a beginner in web app development and wanted to make a dropdown list with groups where when you click on an item it directs you to another page (see the line with customRecipes.html). So here's what I got so far:
<label for="categories" class="label">Categories</label>
<select name="categories" style="margin-right: 10px;" onchange="location = this.value;">
<optgroup label="Starters" id="starters">
<option>will be filled later</option>
<option>will be filled later</option>
</optgroup>
<optgroup label="Main Dishes" id="mainDishes">
<option>will be filled later</option>
<option>will be filled later</option>
</optgroup>
<optgroup label="Desserts" id="desserts">
<option label="custom" value="../Recipes/customRecipes.html">ThisRecipe</option>
<option>will be filled later</option>
</optgroup>
</select>
I got what I wanted but now I want to be able to pass information to the directed page. For example, when ThisRecipe option is selected I want to know its label in the directed page (../Recipes/customRecipes.html). Is this possible?