How to force external links to open in a new tab?

How to force external links to open in a new tab?

per Scott B,
Number of replies: 3

In Moodle 2 on Windows, how to force external links to open in a new tab?

Average of ratings  -
In reply to Scott B

Re: How to force external links to open in a new tab?

per Joseph Rézeau,
Avatar Core developers Avatar Particularly helpful Moodlers Avatar Plugin developers Avatar Testers Avatar Translators

Hi Scott,

I don't think your question is specifically related to moodle version 2.0 nor to Windows and neither to the Lesson module.

I suggest you rephrase your problem, with more specific details and re-post to the General problems forum.

Please note that what you want to do is not accepted by the WC3 regulations. See these links:

All the best,

Joseph

Average of ratings Useful (1)
In reply to Joseph Rézeau

Re: How to force external links to open in a new tab?

per Scott B,

Joseph Rézeau

Thank you.

Scott

In reply to Scott B

Re: How to force external links to open in a new tab?

per brian avery,

I had the same question a while ago, but about a standard html site.

I used a simple piece of code in the html header and a js file. I know nothing about js but apparently it's an acceptable solution. I use this on http://www.insegnanti-inglese.com/ and if I check the page with http://validator.w3.org it gives me the green light. No idea if or how this would work inside moodle though....

See the attached txt file.

Brian