Click to See Complete Forum and Search --> : getting back from a frame
mvandek2
10-02-2003, 07:52 AM
Hi,
Im looking for the right Javascript syntax to get back from a frameset to the previous page with a backbutton in a subframe of that frameset.
To ********:
- I start with a single HTML page with a link
- The link refreshes the pages with a frameset and 2 frames
- The topframe contains a button that brings back the orginal page
Many thanks in advance,
Mark
Add this to your top frame:
<a href="original.htm" target="_top">back</a>
mvandek2
10-02-2003, 08:45 AM
I know but it's a button so I have to use javascript like:
<input class="button" type="button" onClick="location='blabla.php'" value="Terug">
I have to squeeze in the "target" but cannot figure out where.
mvandek2
10-02-2003, 04:58 PM
Okay, what I'm looking for is javascript code to get out of a frameset.
Please let me know if anybody has the code.
onclick="top.location='blah.php'"
Why would you want to use JavaScript when you can do it without?
<form action="http://www.infinitypages.com/banners.html" target="_top">
<p><input type="submit" value="go"></p>
</form>
mvandek2
10-02-2003, 05:21 PM
Ok,
but this frameset is again nested in another frameset so I need
<input class="button" type="button" onClick="parent.location='intranet.php'" target='_top'" value="Terug">
thanks !
target="_top" is top. If you only wanted to go up one set of frames, you'd use target="_parent". target="_top" will use the entire current window, breaking out of frames all together.
mvandek2
10-02-2003, 05:25 PM
Ok,
but this frameset is again nested in another frameset so I need
<input class="button" type="button" onClick="parent.location='intranet.php'" value="Terug">
thanks !
Please try the code I posted above.
mvandek2
10-02-2003, 05:52 PM
Hi Pyro,
Thanks, with FORMS it also works.