Skip navigation
Currently Being Moderated

Help in making 'Regulatory Speed Bumps' to External Links

Aug 28, 2013 12:35 PM

A client of ours (small bank) requires an external link from their website to a 3rd party vendor. We need to create a speed bump to warn users that they are proceeding to a Third Party Site — or Decline with all of the requisite Behaviors. What is the simplest and most elegant way to accomplish this using Dreamweaver CS6?

 
Replies
  • Currently Being Moderated
    Aug 28, 2013 12:50 PM   in reply to BingFL

    Alert and Confirm:

     

     

    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>Confirm Box</title>
    
    <script>
    window.onbeforeunload = function()
    { 
    if (alert('Note: You are about to leave this website.'))
    return true;
    else
    return false;
    }
    </script>
    </head>
    
    <body>
    <ul>
    <li><a href="http://google.com">Google</a></li>
    <li><a href="http://yahoo.com">Yahoo</a></li>
    <li><a href="http://MSN.com">MSN</a></li>
    </ul>
    </body>
    </html>
    
    

     

    Nancy O.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 29, 2013 9:12 AM   in reply to BingFL

    OK. If you have both internal and external links on the page, you can simply give external links an onClick event trigger like this:

     

    <ul>

    <li><a href="http://example.com" onClick="return confirm('Warning: you are about to leave this site. Do you want to continue?')">External Link</a></li>

    <li><a href="index.html">Internal Link</a></li>

    </ul>

     

     

     

    Nancy O.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points