Hi, I need to create a simple script to enable a button on a HTML form only after a certain link is clicked on. Please help! Thanks, Peter
Here is an example how you can do it: <html> <head> <title>Enable Button</title> </head> <script type="text/javascript"> function enable_button(button_id){ document.getElementById(button_id).removeAttribute("disabled"); } </script> <body> <form method="post"> <input type="button" id="button" name="button" value="Button" disabled="disabled" /><br /> <a href="http://rubensargsyan.com/" target="_blank" onclick="enable_button('button');">http://rubensargsyan.com</a> </form> </body> </html> Code (markup):