Have something I'm a bit perplexed by. I have written a very basic function to pass a value from an <option> element nested inside a <select> using the onclick event to another text input. It works fine in Firefox, but isn't working in any other browser, and I can't figure out why, as the console is not showing any errors.
The function looks like this:
function getSPO(spoc)
{
var answer = document.getElementById('ANSWER.TTQ.MENSYS.7.');
answer.value = spoc;
}
And the HTML looks like this:
<tr><td>Sponsor</td><td>
<select>
<option onclick="getSPO('0000001760')">Oxleas Nhs Trust</option>
<option onclick="getSPO('0000000876')">Sheffield Northern General Hospital</option>
<option onclick="getSPO('0000001426')">The Royal Hospitals Nhs Trust</option>
<option onclick="getSPO('0000001563')">Coventry Healthcare Nhs Trust</option>
<option onclick="getSPO('0000002713')">Barking, Havering & Redbridge</option>
<option onclick="getSPO('0000012578')">Hammersmith Hospital Nhs Trust</option>
<option onclick="getSPO('0000012580')">Hammersmith Hospital Nhs Trust</option>
</select>
</td></tr>