/    Sign up×
Community /Pin to ProfileBookmark

linking problem

I have just made a popup window which the only way to close it is to add this ‘<a href=”javascript:lockU=0;self.close()”>Close This Box</a>’

Now what I want it to do is when you click it I want it to open up a webpage in another window (lets just say http://www.google.com) and also close the popup window so to just leave the ‘http://www.google.com‘ window open.

I have spent about a week trying to do this but since I am no good at Javascript I need some help.

–Zero Cool–

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@KorMar 24.2004 — 
I want it to open up a webpage in another window
[/quote]


You can not act upon another window unless between those two windows (popup and window) there is an opener relationship.

If so, and if you want to change the opener, than use this function in popup:


function bla(){

window.opener.location.href = 'newpage.html';

self.close;

}
Copy linkTweet thisAlerts:
@Zero_CoolauthorMar 24.2004 — Sounds good but i know nothing about javascript (i use front page for my site) so how would i go about adding that?
Copy linkTweet thisAlerts:
@KorMar 24.2004 — see example in attachment. Open index1.html.

[upl-file uuid=751ec796-7661-4a01-b31a-9463b3e4d6b4 size=1kB]example.zip[/upl-file]
×

Success!

Help @Zero_Cool 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.18,
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,
)...