Reputation: 9363
i have a page which is divided into frames..and in one of the frame i have a hyperlink which when clicked must open another page in the same window. But it opens the new page in the frame itself. How do i open another page in the whole window rather than in the frame itself
Upvotes: 0
Views: 89
Reputation: 755
When you click your hyperlink you need to give it a parameter such as
<a href="yoursite.com?page=about-us"></a>
Then in the $_POST variable of php you can access your variable using $_POST['page'] which you can use to determine which page you wish to include for your main contact frame. Therefore only one frame changes on your site.
By the way frames are frowned upon these days. Have a look at MVC ( model view controller )
Upvotes: 0
Reputation: 38810
Use a target of '_top' : e.g:
<a href="mylink.html" target="_top">Click me!</a>
Upvotes: 0
Reputation: 4585
You have to define a target: <a href="..." target="_top">
Read here: http://www.htmlcodetutorial.com/linking/_A_TARGET.html
Upvotes: 0
Reputation: 499392
You need to ensure the link target
attribute is set to _top
.
<a href="http://example.com" target="_top">Link to open in whole window</a>
Read about the different values this attribute can take and how they behave here.
Here is the relevant section of the HTML 4.01 spec.
Upvotes: 2