Do you use Hyperlinks instead of JavaScript to open pages?
Last updated by Brady Stroud [SSW] 7 months ago.See historyIf possible you should always use hyperlinks to open new pages on your site instead of using JavaScript.
There are two good reasons for avoiding JavaScript-powered links:
- Copying and pasting sections of the site to an email or a document will maintain the clickable links
- There's an (ever-decreasing) chance a user won't have JavaScript enabled and won't be able to click the link
<div onclick="window.open('mynewpage.html');">Open a new page</div>
Figure: Bad Example - This link can't be clicked on if you paste it into an email or if JavaScript is off
<a href="mynewpage.html">Open a new page</a>
Figure: Good Example - This link can still be clicked on when pasted and when JavaScript is turned off