Anchor type link inside an iframe

Asked

Viewed 421 times

1

Talk personal, all right ?

I develop for a virtual store! And on the page of the products the descriptions are being created by iframe! ( yes , unfortunately I’m not managing to change that)

Meaning we have a domínio just to create the ads (Ads would be pages html any) and embark them via iframe in the domain that is hosted the store!

Well aware of this scenario, we have a link within that iframe with ancoras inside himself, but it doesn’t work! Outside the iframe ( Within the domain where the advertisements are generated, it works right) I’ve researched in several ways, I’ve done by normal line example:

<li><a href="#ancora">Link 1</a></li>

And within the content that is generated by the iframe has the

<a name="ancora"></a>

I’ve tested with target too and it didn’t work I tried with Jquery and it didn’t work either

Someone can give me a light ?

  • I tested here with same domain and different domains and worked normal.

  • 1

    Try to change the name for id...

  • Tested here and works normally with the id instead of name.

  • So it hasn’t worked yet, but I did a test and it’s not working because I’m using fixed height to be without that scroll bar in the iframe or whatever. If I shoot fixed heigth and put something like auto or 100% it works normal but , the iframe gets minute having to roll if the guy doesn’t use the anchors!

1 answer

2

When you use the #(hash) in the href he refers to a id, this put:

alter :

<a name="ancora"></a>

for

<a id="ancora"></a>
  • So it hasn’t worked yet, but I did a test and it’s not working because I’m using fixed height to be without that scroll bar in the iframe or whatever. If I shoot fixed heigth and put something like auto or 100% it works normal however , iframe gets minute having to roll if the guy does not use the anchors!

  • Exactly what you want to do, the solution you already have...

Browser other questions tagged

You are not signed in. Login or sign up in order to post.