Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 592047
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T15:41:55+00:00 2026-05-13T15:41:55+00:00

Here is my problem. I’m working within a CMS and users are able to

  • 0

Here is my problem. I’m working within a CMS and users are able to create hyperlinks (both internal and external) I’m wondering if there is a good way to check when a user clicks a link if they are navigating to an external site. I don’t want to do anything if they use the back/forward buttons, type something into the address bar, etc. I just want to redirect them to a page within our site that takes the address they REALLY want to go to in he query string and display a 5 second (or so) message telling them they are leaving our site and we aren’t responsible for what is there etc etc. Since end users will be responsible for generating most of the links, teaching them to actually point links at the intermediate page is less than ideal so I was wondering if there is an easy solution using javascript.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T15:41:55+00:00Added an answer on May 13, 2026 at 3:41 pm

    You could use jQuery to attach a click event for all links on your site that are external (start with http, minus some special cases), which could then either show a modal dialog, or set window.location to your intermediate page (you can tack on a query string var for the external url). You can make a custom selector to get external links, then attach the behavior:

    $.expr[':'].external = function(obj){
        return !obj.href.match(/^mailto\:/)
                && (obj.hostname != location.hostname);
    };
    
    $('a:external').click(function() { 
        //show your dialog box or set window.location
        //link in question will be $(this).attr('href')
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 289k
  • Answers 289k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer #!/usr/bin/ruby1.8 a = (1..10).to_a a.each_slice(3) do |slice| p slice #… May 13, 2026 at 5:33 pm
  • Editorial Team
    Editorial Team added an answer I'd go for option 2 and generate code in the… May 13, 2026 at 5:33 pm
  • Editorial Team
    Editorial Team added an answer There's a cmdlet for that, Split-Path, the -leaf option gives… May 13, 2026 at 5:33 pm

Related Questions

I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
Here is my problem. I am trying to write a small simple game engine
Here is my problem. I'm working on a Jython program and I have to
Here is my problem. In my game I am trying to implement this leveling
Here is my problem. I'd like to get the last inserted Id with a

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.