Hello there i have a page that has a javascript and I need it to display some stuff, but I also would like to have a link that when you click on it, it will disable that javascript (without taking you to another page) I hope this makes sense Thanks
So, you want to remove javascript from a page essentially using.. JavaScript? Doesn't really make sense, nope.
pretty much, sorry if i didn't explain myself properly, basically what i would need it is a button to enable/disable the javascript in that page I hope this is more clear Cheers
did you use jquery?if so use the jquery attr class to remove your onclick events on all of your tags baasicly you are not disabling the javascript, you just remove the onclick handler on your specific areas
A simpler method might be to use a PHP session. By default you have that block of javascript, then when you click the link.. use PHP code to destroy session on the spot. (but requires refreshing of the same page), if you don't want the page to refresh, then you'll need to do abit more, by having to use AJAX together with PHP. Hope this is useful to you.
Exactly what I was thinking. You're more likely to get a better result using PHP as it will remember the user's specific credentials for that request, making it annoyance-free.