Disabling a link tag using JavaScript on my printable page
Posted
by Fiona Holder
on Stack Overflow
See other posts from Stack Overflow
or by Fiona Holder
Published on 2009-12-10T14:24:37Z
Indexed on
2010/04/18
17:33 UTC
Read the original article
Hit count: 396
I have a script that creates a printable page by copying the HTML across and then doing some manipulation, such as disabling the buttons on the page, on page load.
I also want to disable the links on the page. I don't really mind if they look like links still as long as they don't do anything, and don't give any JavaScript errors! The anchor tag doesn't seem to have a disabled attribute...
Unfortunately, I can't use jQuery, so JavaScript only please!
Edit: I want to disable the links, buttons etc on the page so that when the 'printable page' opens in another window, the user cannot mess with it by clicking buttons or links. I want it to essentially be a 'frozen snapshot' of the page that they want to print.
© Stack Overflow or respective owner