Mark Stosberg wrote:
>
> * Call the function through a method such as "onClick":
> <INPUT TYPE="submit" NAME="action" VALUE="delete" onClick="item_delete()">
>
<nit_picking_detail>
Submit objects should not contain an onClick
handler, better off either:
a) moving the call to item_delete() to an onSubmit handler in the <form>
b) or changing the input type of 'action' from 'submit' to 'button'
and adding a 'document.forms['the_form_name'].submit() in the
onClick handler.
a) before:
<INPUT TYPE="submit" NAME="action" VALUE="delete" onClick="item_delete()">
after:
<FORM NAME="..." onSubmit="item_delete()">
<INPUT TYPE="submit" NAME="action" VALUE="delete">
b) before
<INPUT TYPE="submit" NAME="action" VALUE="delete" onClick="item_delete()">
after:
<INPUT TYPE="button" NAME="action" VALUE="delete" onClick="item_delete()">
<script>
function item_delete() {
...stmts removed...
document.forms['the_form_name'].submit();
}
</script>
</nit_picking_detail>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]