How to Make all Links Within an iframe or Google Gadget Open in a New Window

August 11, 2009 · 2 comments

Just made a Google gadget from the Twitter widget code and realized that all the links were opening within the Google gadget iframe.

This is no good. A quick and dirty solution for this…

If you need to have all links within an iframe or Google gadget use “base target”.

To do this you will need to add a head section to your gadget immediately after the “[CDATA[” part and add the “base target=”_blank”

basetarget

This will in most cases take care of the problem and make all links inside that iframe or Google gadget open up in a new window.

Related posts:
Friendster Announces Open Social and Multi Lingual Mobile
Google Gadget Canvas / Portability Strategy
Matt Cutts of Google Discusses Links and Widgets

{ 2 comments… read them below or add one }

1 blither October 18, 2009 at 8:09 pm

Why are u the only one posting this as a solution…Possible SEO strategy in itself…
ummm
cause it doesn’t work

2 Amit November 25, 2009 at 11:14 am

This is really nice info.Thanks for such a wonderful post.

Leave a Comment

Do not spam please, if your name has keywords in it your comment will be deleted. Example: Your name shouldn't be "SEO Chicago", it should be "Sue" or "Bob".


Previous post:

Next post: