pnmorrison Posted February 16, 2009 Report Posted February 16, 2009 i have a link at the bottom of my page which allows users to print the page. It uses onClick="javascript:window.print();" but this causes the page to fail its validation. Can anyone be so kind to rectify this issue for me - tell me what i need to do to fix this. Rgds. Quote
PicnicTutorials Posted February 16, 2009 Report Posted February 16, 2009 Hi, are you using an XHTML Doctype? That seems to be the reason why. I googled for a while but was unable to find an answer other than changing your doctype to HTML. Quote
monkeysaurus Posted February 16, 2009 Report Posted February 16, 2009 Ideally, you'd be looking to remove onClick entirely and use unobtrusive techniques, but this should work: print Note that onclick is in lower case and the javascript: part is removed. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.