title: How to show a javascript confirmation box on "WordPress menu" before leaving the website
body: <p>I wants to show a javascript message box when a user clicks on a "FORUM" link on WordPress menu.</p>
  
  <p>The message box should show a message like "You are leaving this website..." and <strong>once the user confirms the message box, it should open an external link in a new tab.</strong></p>
  
  <p><a href="https://web.archive.org/web/20211028110528/http://www.4guysfromrolla.com/demos/OnBeforeUnloadDemo1.htm" rel="nofollow">I had tried this</a>, but it will fire the message box, when ever I leave the website or reload the page. I just wants this message box on a single WordPress menu item.</p>
  
  <p>I saw some tutorials to do this, but not able to do it on WordPress menu.</p>
  
  <p>WordPress does not recognize <code>javascript:void(0)</code> or any other javascript function on URL part.</p>
  
  <p>Any ideas??</p>