Francis Vargas Francis Vargas - 2 months ago 4
HTML Question

When clicking/choosing an option a link specified to that option will proceed

Hello everyone! I just want to ask, when I choose regular in my drop down. The link goes to the regular.html as well as the contractual. How can I do it? Thank you in advance. :)

Also here's my code for the regular.html:
regular.html

<html>
<head>
<title>Drop down</title>
</head>
<body>
<h1>Regular</h1>
<select>
<option href="regular.html">Regular</option>
<option href="contractual.html">Contractual</option>
</select>
</body>
</html>


And this is for the contractual:
contractual.html

<html>
<head>
<title>Drop down</title>
</head>
<body>
<h1>Contractual</h1>
<select>
<option href="regular.html">Regular</option>
<option href="contractual.html">Contractual</option>
</select>
</body>
</html>

Answer
    <h1>Main Page</h1>
    <select onchange="location = this.options[this.selectedIndex].value;">
        <option value="regular.html">Regular</option>
        <option value="contractual.html">Contractual</option>
    </select>