//html code for form
<form id="contactform" method="post" action="/action_page.php">
//submit button html code
<input type="button" id="submit" onclick="submit_form()" value="Submit">
//javascript submit function.
function submit_form()
{
document.getElementById("contactform").submit();
return false;
}
so here are the html and javascript snippets of my contact form, now when I am debugging my javascript code it is giving me a member not found error at the document.getElementById("contactform").submit(); line. The problem still persists even though the id of my button and the name of the function that runs are different. Can somebody please help me resolve this?