You could take the onchange= inline event handler away from the <select> element entirely and then add it to the callback function...
- Code: Select all
function fnCallback(e) {
var ok = confirm("Are you welling to continue? ");
if(ok)
{
// If this is a select change things a bit
if (this.tagName == 'SELECT')
window.location.href=this.options[this.selectedIndex].value;
return true;
}
else
{
YAHOO.util.Event.preventDefault(e);
YAHOO.util.Event.stopPropagation(e);
return false;
}
}