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?
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? :)
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.
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
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
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
is working on a reply...