Instead, you have to use an onchange handler in the SELECT, like this:

function fAlertA() { alert(’A'); }
function fAlertB() { alert(’B'); }
function fHandleActionSelection(nSelect)
var iOptionIndex = nSelect.selectedIndex;
if (iOptionIndex > 0) { //skip over ‘Actions’
var sFnName = nSelect.options[iOptionIndex].value;
<select onchange=”fHandleActionSelection(this)”>
<option value=”fAlertA”>a</option>
<option value=”fAlertB”>b</option>

Trackback URL
Leave your own comments about this post:
You must be logged in to post a comment.