I have the following form:
<form id="signup" onsubmit="return false;">
... form content...
<input class="button" type="submit" />
</form>
Where upon clicking the button, a JavaScript function signup() is called. This function uses an AJAX call to validate the form (compare to current database values), and then submit the form via a PHP function.
My question is: If the user has their JavaScript disabled in their browser, is there a way that I can modify the <form> tag to include an action and method?
Since HTML5 allows <noscript> tags within the body, I thought I'd try something like:
<form id="signup" <noscript>action="..." method="post"</noscript>>
but that doesn't work.
If the user has their JS enabled, I would like the AJAX calls to handle everything - it makes for a very clean user experience. BUT, I need it to still be functional for those people who have disabled their JS.
Thank you in advance.
<form onsubmit='return false;' method='post' action='otherpage.php'>?