Captain825 Posted July 25, 2008 Share Posted July 25, 2008 Hi, I am using Dreamweaver CS3. I would like the links on a page to be disabled until the user clicks on a check box at which time the links would be enabled. If the user then unchecks the check box, I would like the links to be disabled again. I would appreciate any help on this. Thanks, Link to comment https://forums.phpfreaks.com/topic/116606-disabling-links/ Share on other sites More sharing options...
JonnoTheDev Posted July 25, 2008 Share Posted July 25, 2008 Requires DOM scripting in Javascript. Look for some tutorials. Link to comment https://forums.phpfreaks.com/topic/116606-disabling-links/#findComment-599573 Share on other sites More sharing options...
stricks1984 Posted July 25, 2008 Share Posted July 25, 2008 <input type="checkbox" oncheck="myDisable(this)" /> <a href="" id="link"></a> <script> function myDisable(e){ if(e.checked){ document.getElementById('link').disabled = true; } } </script> I think that should work, I didn't test it, just wrote. Link to comment https://forums.phpfreaks.com/topic/116606-disabling-links/#findComment-599574 Share on other sites More sharing options...
DeanWhitehouse Posted July 25, 2008 Share Posted July 25, 2008 This would be easy to get past if they have javascript disabled, unless you have all the links disabled to begin with. Link to comment https://forums.phpfreaks.com/topic/116606-disabling-links/#findComment-599708 Share on other sites More sharing options...
stricks1984 Posted July 28, 2008 Share Posted July 28, 2008 How would you go about doing that? EDIT: Nevermind that... Wow... "This would be easy to get past if they have javascript disabled" Oops. Link to comment https://forums.phpfreaks.com/topic/116606-disabling-links/#findComment-601937 Share on other sites More sharing options...
tibberous Posted July 28, 2008 Share Posted July 28, 2008 Either way it's really easy to get past - I'm guessing it is for some kind of disclaimer? Link to comment https://forums.phpfreaks.com/topic/116606-disabling-links/#findComment-601939 Share on other sites More sharing options...
stricks1984 Posted July 28, 2008 Share Posted July 28, 2008 Anywho if that's the case hmm. VB script perhaps? Or use some type of AJAX technique (though if js is disabled couldn't do it through that I guess.) Or an annoying way would be submit the form when a checkbox is click and refresh the results based on that. That will stop the JS problem. Link to comment https://forums.phpfreaks.com/topic/116606-disabling-links/#findComment-601944 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.