Pergunta

I have a tumblr site where each post has share button for Facebook, Twitter, Pinterest, Google+, and email. They are all supposed to open in a new window. Facebook and Twitter do, but Pinterest, G+ and email which open in the same window.

This tumblr site will live in an iframe on the company's main site. From the main site, the Pinterest, G+, and email links don't open at all. They don't do anything. Facebook and Twitter links have the same behavior as behavior as before; they work.

Here's the html I'm using for the links:

    <ul>
         <li class="open-in-app"><a href="#" class="share-item open-in-app" data-post="{PostID}">Open in app</a></li>
         <li><a href="http://facebook.com/sharer.php?u={URLEncodedPermalink}&amp;t={URLEncodedTitle}" class="share-item facebook" target="_blank"><img src="http://cdn.shopify.com/s/files/1/0248/9574/t/1/assets/productShareFB.png?7867"></a></li>
         <li><a href="https://twitter.com/intent/tweet?text={URLEncodedTweetSummary}" class="share-item twitter" target="_blank"><img src="http://cdn.shopify.com/s/files/1/0248/9574/t/1/assets/productShareTwitter.png?7867"></a></li>

         <li><a href="http://pinterest.com/pin/create/button/?url={URLEncodedPermalink}&amp;media={PhotoURL-HighRes}&amp;description=Isaora" class="share-item"><img src="http://cdn.shopify.com/s/files/1/0248/9574/t/1/assets/productSharePinterest.png?7867"></a></li>
         <li><a href="mailto:?subject={URLEncodedShareString}&amp;body={URLEncodedMailSummary}" class="share-item mail"><img src="http://cdn.shopify.com/s/files/1/0248/9574/t/1/assets/productShareMail.png?7867"></a></li>
         <li><a href="https://plus.google.com/share?url={URLEncodedPermalink}" class="share-item"><img src="http://cdn.shopify.com/s/files/1/0248/9574/t/1/assets/productShareGPlus.png?7867"></a></li>
     </ul>

How do I:
* get the email, pinterest and g+ links to work on the tumblr site is inside an iframe
* get them to open in a new window.

Foi útil?

Solução

get the email, pinterest and g+ links to work on the tumblr site is inside an iframe

You can't. They use HTTP headers to tell browsers they should not be opened in frames.

get them to open in a new window.

The same way as the links which already open in a new window:

target="_blank"
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top