Jump to content

External links opening up in a new window


Xurion

Recommended Posts

Hi all,

 

Lets assume I have domain.com, and the site hosted there has many links that either link to pages within itself, or pages on different domains. Is there a way for all external links to open up in a new window, and have all local links open up in the same window? What I am looking for is a global way to set this rather than specifying every external link with a target="_blank" attribute manually.

 

Thanks in advance.

 

Xur~

opening new windows is considered a docuemnt effect and as such should be controlled by javascript.

 

http://www.quirksmode.org/js/events_advanced.html gives details on how to add eventhandlers to elements - use that to add the onclick and onkeypres eventhandlers and make tehm open a newwindow - note microsofts implementation means the 'this' object reference is useless - which is pretty bloody useless in itself if you ask me (another 'feather' in the MS cap).

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.