Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
You have a series of radio buttons. The last radio button is labeled “Other” and has a text input field associated with it. Naturally you’d want that radio button to be selected if the user has entered text in the Other field:
<p>How did you hear about us?</p>
<ul id="chooseSource">
<li>
<input name="source" id="source1" type="radio" value="www" />
<label for="source1">Website or Blog</label>
</li>
<li>
<input name="source" id="source2" type="radio" value="mag" />
<label for="source2">Magazine</label>
</li>
<li>
<input name="source" id="source3" type="radio" value="per" />
<label for="source3">Friend</label>
</li>
<li>
<input name="source" id="source4" type="radio" value="oth" />
<label for="source4">Other</label>
<input name="source4txt" id="source4txt" type="text" />
</li>
</ul>