Forum Moderators: open

Message Too Old, No Replies

Every hyperlink a new window

         

raja4

10:07 pm on Jul 18, 2003 (gmt 0)

10+ Year Member



Is there any way to ensure that every hyperlink in a given table is opened in a new window?

Thanks
raja4

Jenstar

10:11 pm on Jul 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Coding each link with target="_blank" will open each one in a new window. Not sure if you can apply it to the table itself, which would result in all the links within the table to open in a new window, without using the _blank code on each link.

raja4

10:18 pm on Jul 18, 2003 (gmt 0)

10+ Year Member



I am trying to open Google Adsense ads in a new window so that people don't leave my site. Is it possible?

Dayo_UK

10:19 pm on Jul 18, 2003 (gmt 0)



Even if it is possible I would not do it.

Jenstar

10:29 pm on Jul 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Google Adsense is paying you to show their ads, and they want those links opening in the same browser window. I agree with Dayo_UK, don't do it and keep the company paying you happy :)

Part of the Adsense TOS covers that you cannot change code - making the links open in a new browser window would probably fall under that.

WebDevInfo

2:31 pm on Jul 20, 2003 (gmt 0)

10+ Year Member



The Google AdSense code is javascript, so you can't change the code anyway.

The only way I could see you doing it, would be to put the ads in an iframe and write some code to open a new window if the click is inside the iframe.

But like the others said, this would probably not be a good idea and could cause Google to deactivate your account.

chiyo

2:41 pm on Jul 20, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I remember several years back we used "target" as we had the same concerns about people leaving our site. However we just dont worry about it now. Basically if they like what is in your site they will come back. Its just a backbutton or two away.

If someone is going to leave your site, though, better with paid exit! And they may not be too happy to still see your site in a window when they thought they had "asked" to leave it.

And yes of course, doing this violates the google adsense TOS.

Velmu

2:56 pm on Jul 20, 2003 (gmt 0)

10+ Year Member



<base target="_blank"> and if you don't want some link to open in a new window you have to give it a another target.

But you shouldn't use that code with Google Adsense.

korkus2000

12:19 pm on Jul 21, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



One thing that chiyo pointed out that I think is important is that your site is just a back button away. I have stopped using target also and not seen page views stop. It may help brand your site as the close all their windows at the end of their session, but you really won't get much more browsing out of them.

The paid exit should be the one that counts. If you are paying me to leave you can have the nicest most user friendly way possible to go.

chiyo

12:35 pm on Jul 21, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



i had a look at the Adsense TOS and i didn't see anything there that explicity bans using the "base target=". It certainly does not need any modifications to their code. I would also guess some sites use the base-target= anyway.

I'm no programmer but maybe there is something in their own script that forces targets back to normal overiding remote base target=

Or on the other hand maybe google doesnt care.

For me, I guess if you are serious about site advertising, and it does suit your site, the key would surely be to incorporate ads in a way that benefits both your users and your advertisers. That way it all makes (Ad)Sense! Personally, using target=new window/blank etc does not seem to benefit anybody, including your own site..