Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • JJ 15 posts 35 karma points
    Nov 18, 2012 @ 11:02
    JJ
    0

    You are leaving this site...

    How would others implement detecting when a link to an external page has been clicked and directing them to a "you are leaving this site" page (with the external encoded url in the querystring)?

    I can't rely on the page editor doing this within the richtext editor, so I need to scan for the link and edit it accordingly. How would others do this within Umbraco?

    Thanks all,

    JJ

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Nov 18, 2012 @ 21:40
    Jan Skovgaard
    0

    Hi JJ

    I suppose you could use JavaScript to detect outgoing links and then create a modal box, where the user needs to confirm they want to leave the page.

    But I must admit that I find these kind of boxes pretty annoying. Is there any good reason for implementing stuff like this? What is the user story? :)

    /Jan

  • JJ 15 posts 35 karma points
    Nov 19, 2012 @ 08:56
    JJ
    0

    Hi Jan,

    I agree with you. Haven't seen this since the earlier days of websites. I think people know when they are leaving a site. Its required because the old site has it. They also want a page instead of a modal box.

    Using your approach, would iterating through any links with jquery and detecting whether or not they are local links then inserting a http://www.homepage.com/leaving.aspx?url=theExternalUrl perhaps work?

    If so, I've then just got to work out how to know if they are local links or not.

    Thanks,

    JJ

     

Please Sign in or register to post replies

Write your reply to:

Draft