Hello! In normal template code it is easy to do. Just use a bit of javascript to display an alert before setting the URL. Using jquery it would be very easy to make all links with a certain css class exhibit this behavior.
Using FCKEditor, things are a little more tricky. This is because you have no real control over the HTML that FCKEditor inserts when users add a link to the text (same problem with images or other items inserted via FCKEditor). However, you can achieve what you want by using jquery as described above. In FCKEditor, your editors set a certain css class on the links -> this can be done either explicity, by typing the css class in the advanced tab of the link editing dialog, or by configuring the styles menu in FCKEditor to offer a style for links which the editor then simply chooses while selecting the link. In the page template, use jquery to substitute all links with your special css class in the onLoad handler for the page. In this way, the link-behavoiur will work within public and author modes of the website. Only within the FCKEditor's edit field will the behavior not be active. Regards from Vienna, Richard Von: [email protected] [mailto:[email protected]] Im Auftrag von Anjaan84 Gesendet: Dienstag, 09. November 2010 00:15 An: [email protected] Betreff: [magnolia-user] Alert before URL redirect Hello, I have links referenced on my site that points to external sources (outside of my domain). Assume this is my site and I post a source here Google<http://www.google.com>. When users click on this source, I would like to alert the user with a pop-up (or something) stating something like "You are now navigating away from www.mysite.com<http://www.mysite.com>" and then send them to the external source instead of simply sending them directly without some sort of notification. Does anyone have a good working solution to accomplish this? This is far easy in straight up JavaScript/HTML pages, but I am trying to get this to work from the templates and fckEditor. Appreciate any hints and responses. Thank you, ________________________________ View this message in context: Alert before URL redirect<http://old.nabble.com/Alert-before-URL-redirect-tp30164747p30164747.html> Sent from the Magnolia - User mailing list archive<http://old.nabble.com/Magnolia---User-f646.html> at Nabble.com. ---------------------------------------------------------------- For list details see http://www.magnolia-cms.com/home/community/mailing-lists.html To unsubscribe, E-mail to: <[email protected]> ----------------------------------------------------------------
