/    Sign up×
Community /Pin to ProfileBookmark

Problem with Frame Branding

I’m using this script [url]http://javascript.internet.com/navigation/frame-branding.html[/url] on my site at [url]http://machenfamily.com[/url]

It works great but I would like;

The content opened in the same window instead of a new one, is that possible?

The “Close” button I added to the banner at the top will not close the window for some reason, what am I doing wrong?

Thanks in advance!

to post a comment
JavaScript

5 Comments(s)

Copy linkTweet thisAlerts:
@Khalid_AliJun 09.2003 — You need to make a little code change.

Here is the one link for example from the link you posted above

<a target="_new" href="http://www.lycos.com/" onClick="return frameBranding('http://www.lycos.com', 'http://javascript.internet.com/navigation/frame-branding-thanks.html', 'cols');">Lycos (with cols branding)</a>

In the very beginiing there is an attribute

target="_new"

change this to this

target="_self"

and the frames will open in the current window.
Copy linkTweet thisAlerts:
@EarlauthorJun 09.2003 — I don't even use _new in the link. They javascript itself opens a new window. Is there an extra piece of code I need to add to the javascript or change something for it to open in the same window?
Copy linkTweet thisAlerts:
@Khalid_AliJun 09.2003 — You will need to post javascript code for at least this function

frameBranding
Copy linkTweet thisAlerts:
@EarlauthorJun 09.2003 — <SCRIPT LANGUAGE="JavaScript">

<!-- Original: Grace Li ([email protected]) -->

<!-- Web Site: http://www.sysu.net/gl105 -->

<!-- Modified By: Ronnie T. Moore, Editor -->

<!-- This script and many more are available free online at -->

<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin

percent = "10%";

function frameBranding(actualurl, brandingurl, frametype) {

var framewin = window.open("","brandingframe");

with (framewin.document) {

write("<html><frameset " + frametype + "=" + percent + ",*>");

write("<frame src=" + brandingurl + ">");

write(" <frame src=" + actualurl + ">");

write("</frameset></html>");

}

return false;

}

// End -->

</script>
Copy linkTweet thisAlerts:
@EarlauthorJun 09.2003 — Would you use window.open.self ?
×

Success!

Help @Earl 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.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: @nearjob,
tipped: article
amount: 1000 SATS,

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

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