My form has two buttons: delete
and play
. Currently, the user must use the submit buttons at the bottom of the form to perform either of these tasks. I'd like to add a hyperlink to the top of the page with an onclick
function that fires the appropriate submit button.
Here's what I'm working with. Currently, the hyperlink isn't working at all.
Hyperlink at top of page:
<a href='#' onlick='document.getElementById('playlist').click()'>test</a>
And here is my form with its submit buttons.
<form id = 'allverses' name= 'allverses' action='' method='POST'>
<button name="delete" type="SUBMIT" class="deletebutton" id="delete" value="delete" action="POST">
<button name="playlist" type="SUBMIT" class="playbutton" id="playlist" value="play" action="POST">
</form>