I'm looking for a script that will enable a link that is unabled at first, but when the user clicks on a specific link, the unabled link is activated.
Anyone have any good ideas?
I'm looking for a script that will enable a link that is unabled at first, but when the user clicks on a specific link, the unabled link is activated.
Anyone have any good ideas?
HTML Code:<html> <head> <script language="javascript"> function disableField() { document.links[0].disabled=false; } </script> </head> <body> <a href="http://www.google.com" disabled=true">LINK 1</a> <a href="javascript:disableField() ">LINK 2<a/> </body> </html>
That should do what you're looking for.
If you wanted to have it point to another page you would use the onclick function
I don't know why it isn't working. It works fine when I run it. Have you got javascript turned on in your browser?HTML Code:<html> <head> <script language="javascript"> function disableField() { document.links[0].disabled=false; } </script> </head> <body> <a href="http://www.google.com" disabled=true">LINK 1</a> <a href="http://www.google.com" TARGET="_blank" OnClick="disableField();">LINK 2</a> </body> </html>
Last edited by keyboard; 08-08-2011 at 06:14 AM.
Bookmarks