...
Code Block | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
// Change the size and color of the buttons document.getElementById('form[rejectBtn]').setAttribute("style","background:red;border:1px solid #eeeeee;width:150px;"); document.getElementById('form[approveBtn]').setAttribute("style","background:green;border:1px solid #eeeeee;width:150px;"); document.getElementById('form[moreinfoBtn]').setAttribute("style","background:#3397e1;border:1px solid #eeeeee;width:150px;"); // Add events on the buttons document.getElementById('form[rejectBtn]').onclick = function() { document.getElementById("form[approval]").value = '2'; document.forms[0].submit(); } document.getElementById('form[approveBtn]').onclick = function() { document.getElementById("form[approval]").value = '1'; document.forms[0].submit(); } document.getElementById('form[moreinfoBtn]').onclick = function() { document.getElementById("form[approval]").value = '3'; document.forms[0].submit(); } |
...