ohho
ohho

Reputation: 51941

target= out of a iframe but stays in the same browser window?

Currently, site A is embedded in a site B's iframe. For one .php page, I'd like to jump out of the parent iframe when submitting to the page:

<form method="post" action="home.php" name="homeForm" target="_blank">

However, this will pop up a new window.

Is there a way to jump out of the iframe but remind in the same browser window?

Upvotes: 2

Views: 1376

Answers (2)

John Parker
John Parker

Reputation: 54445

The usual approach is to use target="_parent" or target="_top".

As per the HTML 4 specification:

_parent - The user agent should load the document into the immediate FRAMESET parent of the current frame. This value is equivalent to _self if the current frame has no parent.

_top - The user agent should load the document into the full, original window (thus canceling all other frames). This value is equivalent to _self if the current frame has no parent.

However, it should be noted that the use of iframes, etc. isn't a part of the HTML5 specification.

Upvotes: 3

k102
k102

Reputation: 8079

target="_parent" this will help you

Upvotes: 0

Related Questions