Jump to content

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).

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.