skip to Main Content

I looked at many examples showing the different values of the target attribute and understand what each does, but I could not find any of the examples actually using the _parent or the _top values. All of these were basically just simulated. <frame>s are deprecated, so I did not look for examples with s. I saw this example linked from this Stack Overflow post. I also saw this YouTube video. There were several other simulated examples, but I could not find _parent and _top used anywhere.

So are the _parent and _top anchor target attribute values on their way to being deprecated, or do some developers still use these? Can anybody provide an example that does not use <frame>s.

Thanks for any help.

2

Answers


  1. Because iframes can still be used, use cases for target _top and _parent are also conceivable.

    Login or Signup to reply.
  2. There are no reasons to use parent or top except in a page that may want to break out of an iFrame or the luckily seldom used frame.

    This would likely only be used on purpose since to stop being framed you would just use X-Frame-Options:
    how to block website from loading in iframe?

    So yes, if you have a site where you for some reason want a page you load in an iFrame to target its parent or top, you would need to target _top or _parent

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search