Can i change the form action url throw javascript? I want to do this, in order to protect myself from the massive spam bots attacks
<form id="myForm" method="post" action="dumbyurl.php"> </form> <script type="text/javascript"> document.getElementById("myForm").setAttribute("action","realurl.php"); </script> Code (markup): although some bots may get the action of the form after the window has loaded and executed javascripts... you could use a timer for a bit more protection... like: <form id="myForm" method="post" action="dumbyurl.php"> </form> <script type="text/javascript"> setTimeout(function() { document.getElementById("myForm").setAttribute("action","realurl.php"); }, 2000); </script> Code (markup): This way it would wait 2 seconds (2000ms) after the page has loaded, and then the code to change the action is executed...