Try this instead:
function rowSelected(event, type) {
var eventRow = event.currentTarget;
}
You do not allow passing an argument to the event. Well, you were, but it was passed to a type variable. Now it eventwill contain a value currentTarget.
EDIT
Oh wait! You also want to pass a string type.
That should do it!
<tr onclick="rowSelected(event, 'thisRowType')">
... row content ...
</tr>
<script type="text/javascript">
function rowSelected(event, type) {
var eventRow = event.currentTarget;
alert(type);
}
</script>
source
share