/    Sign up×
Community /Pin to ProfileBookmark

getting back from a frame

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 clearify:
– 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

to post a comment
JavaScript

11 Comments(s)

Copy linkTweet thisAlerts:
@pyroOct 02.2003 — Add this to your top frame:

<a href="original.htm" target="_top">back</a>
Copy linkTweet thisAlerts:
@mvandek2authorOct 02.2003 — 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.
Copy linkTweet thisAlerts:
@mvandek2authorOct 02.2003 — Okay, what I'm looking for is javascript code to get out of a frameset.

Please let me know if anybody has the code.
Copy linkTweet thisAlerts:
@SamOct 02.2003 — onclick="top.location='blah.php'"
Copy linkTweet thisAlerts:
@pyroOct 02.2003 — Why would you want to use JavaScript when you can do it without?

&lt;form action="http://www.infinitypages.com/banners.html" target="_top"&gt;
&lt;p&gt;&lt;input type="submit" value="go"&gt;&lt;/p&gt;
&lt;/form&gt;
Copy linkTweet thisAlerts:
@mvandek2authorOct 02.2003 — 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 !
Copy linkTweet thisAlerts:
@pyroOct 02.2003 — 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.
Copy linkTweet thisAlerts:
@mvandek2authorOct 02.2003 — 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 !
Copy linkTweet thisAlerts:
@pyroOct 02.2003 — Please try the code I posted above.
Copy linkTweet thisAlerts:
@mvandek2authorOct 02.2003 — Hi Pyro,

Thanks, with FORMS it also works.
Copy linkTweet thisAlerts:
@pyroOct 02.2003 — You are welcome... ?
×

Success!

Help @mvandek2 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.3,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...