HTML Code:

<form method="post" action="editor.php">
  <select name="url">
    <option selected>- - Select a Page - -</option>
    <option value="home">Home</option>
    <option value="about">About</option>
    <option value="other">Other</option>
  </select>

<!– if the option ‘other’ is selected, display this, if not, hide it –>
<input type="text" name="other">
<!– end textbox –>

<input type="submit" value="Submit"></form>


Any idea how to achieve this?

I just need to convert the html comments above into actual javascript

i’ve seen this on many websites (forgot which ones).

Any help is appreciated
Thanks