/    Sign up×
Community /Pin to ProfileBookmark

Is there a way? Page redirect

Main Page holds 2 frames Top Frame & Bottom Frame

What I want is for the Main Page to monitor Bottom Frame and if the user goes to 1 CERTAIN WEBSITE I want Main Page to swap out Bottom Frames 1 CERTAIN WEBSITE with another site… Example

User tells Bottom Frame they want to go to “http://www.coke.com” but Main Page tell Bottom Frame to load “http://www.pepsi.com” instead but it ONLY redirects to pepsi if they go to coke, not if they go anywhere else..

Is this even possible? Thanks

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@rootMar 27.2007 — Not sure but think its parent.document.frames[frameref].src="http://www.domain.com/your/url.html";

where frameref is either the frame 'number' or the "name" of the frame.

I have only used frame swapping myself once and it was allong time ago and dont have the example to hand, so you should try looking at the referencing aspect a little closer.
×

Success!

Help @niki5000 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 5.16,
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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

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

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...