To submit a form based on the id, one line. onClick="document.getElementById('FORMID').submit();"