/    Sign up×
Community /Pin to ProfileBookmark

Testing framesets and opening top page accordingly with JavaScript

From: Jon – view profile
Date: Wed, Apr 19 2006 3:40 pm
Email: “Jon” <jon.whittlest…@gmail.com>
Groups: alt.comp.lang.javascript
Not yet rated
Rating:
show options

Reply | Reply to Author | Forward | Print | Individual Message | Show original | Remove | Report Abuse | Find messages by this author

Hi there,

I’m having a bit of difficulty with a function that will open a link
depending on the calling frameset.
The function (promoLink()) is located in a frame
(trinity.getminted.com) and depending on the frameset
([url]www.instanwinmirror.com[/url] or [url]www.sundaymailinstantwin.com[/url]) I wish to
open the link [url]www.instantwincasino.com[/url] and [url]www.sundaymailcasino.com[/url]
respectively.

I am having trouble testing the properties of the frameset, I have
tried the following and javaScript does not seem to recognise them as a
string.

function promoLink()
{

if (parent.topFrame.location.href = …
if (top.location.href=..
if (window.top.document.location.href=..

}

I’d appreciate any pointers! Thanks in advance for looking.
Jon

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@mrhooApr 19.2006 — on loading the top frameset element,

run a script that gets the top location;

use this to figure what pages you have for this guy;

If you have lots of choices, set up an array of alternate addresses;

Collect the links you are going to change

replace the URl's in the links with the correct ones

It will take a couple more lines than this note, but not many.
×

Success!

Help @jwhittlestone 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.17,
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,
)...