Advertisements - open in new tab/window

greg's picture

He has: 1,581 posts

Joined: Nov 2005

I have made my site xhtml strict which of course means I cannot use the target="_blank" to open ads in a new tab
(I sincerly hate the fact they removed that, it was a great function)

So what are the alternatives? With either Javascript or HTML to open in new tab or window? (new tab is more preferred of course)

To avoid the arguement, I do understand and agree that pop-ups and new tabs/windows can be a bad thing
But in certain curcumstances it is very acceptable

My Imagehosting site is something we find most users leave open all day, and now and then upload an image or use their account to get links for an image they already have uploaded, so if they click an advertisement and it takes them away from our site it is annoying

The ads I have are ok with link editing as long as the vars or code structure that relates to the ad details and our customer number isn't changed
Other than that it states we are ok to change the links to suit our site

Any ideas?
Cheers

They have: 2 posts

Joined: Oct 2007

use the following code

TEXT/IMAGE

PS: I don't know if that is XHTML valid, but give it a shot!

greg's picture

He has: 1,581 posts

Joined: Nov 2005

hmm, thanks for the post
That of course is a new window, but might be seen as like a pop-up

I hate those myself and am concerned about putting them on my site too

It will be fine with xhtml strict though

that is looking like my only option if i remain with xhtml strict and dont want users to be taken away from my site Mad

He has: 629 posts

Joined: May 2007

greg's picture

He has: 1,581 posts

Joined: Nov 2005

WOW!

thanks for that! That's pretty neat.

It works like a charm!
New tab, no popups and xhtml strict still!

Cheers!

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.