I can't figure out why the following is not working in Google Chrome even though, in my mind, its quite straightforward standard Javascript. By 'not working' I mean that no alert box is appearing when I pick items off the pulldown menu.

<form name="mainForm">
<select name="submit_sel" onchange="return doit('sdfgdfgd');">
<option selected="selected">If selected</option>
<option value="delete">Delete it</option>
<option value="edit">Edit it</option>
</select>
</form>

(and the Javascript function is.......)

function doit (fred) {
alert(fred);
return true;
}

I wanted initially to investigate why the following more elaborate code (with some PHP) wasn't working, but narrowed it down to the above.

<form action="projects.php?<?php print $_SERVER['QUERY_STRING']; ?>" method="post" name="mainForm"><select name="dllSelectedProject" id="dllSelectedProject" onchange="raiseEvent('SelectProject','<?php print $projectSelected; ?>');" style="width:180px">
<option selected="selected">If selected</option>
<option value="delete">Delete it</option>
<option value="edit">Edit it</option>
</select>
</form>

Thanks, and I look forward to your replies.