html iframe question

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
suthie
Forum Commoner
Posts: 68
Joined: Sat Jun 09, 2007 10:46 am

html iframe question

Post by suthie »

how can i make the page change from within an iframe? basically i have my page and in it i have an iframe ("theframe")
it looks like this:

Code: Select all

//////////////////////////////////x//
// this is the whole window         //
//                                 //
//--------------------------------//
//- in here is the iframe       - //
//-    "theframe"                - //
//-                              -//
//-                              -//
//-                              -//
//---------------------------------//
/////////////////////////////////////
i know that to make just the frame go to a different page, i can use

Code: Select all

<a href="page" target="theframe">link</a>
but how do a make a link that is within "theframe" target the parent window?
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

I'd guess:

Code: Select all

<a href = "mainpage.html" target = "_top">
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
suthie
Forum Commoner
Posts: 68
Joined: Sat Jun 09, 2007 10:46 am

Post by suthie »

awesome! it works thanks
Post Reply