/    Sign up×
Community /Pin to ProfileBookmark

Close Window – should be easy but I’m stupid!!! Help!!!

I hate to post to ask a question because I usually find all my answers by reading… anywho… if someone could help me figure this one out I would be eternally greatful! This is the site I am working on… [url]http://www.biciconcepts.com[/url] and I just had to ad a pop up window for a contest there running so that people don’t miss out on it if they don’t click on the “news” link. So the popup window contains a link to the “news” page – but when they click it I end up with two open pages. I mean it’s okay that it goes to the news page in the front window and hides the other but, I know I don’t like when a site opens up unecessary windows… so if anyone out there knows the quick fix I would love that!! Ultimately I would like to be left with one window showing news. Unless of course they don’t click the link and just close the window themselves… Thanks

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@Arty_EffemFeb 08.2007 — I hate to post to ask a question because I usually find all my answers by reading... anywho... if someone could help me figure this one out I would be eternally greatful! This is the site I am working on... http://www.biciconcepts.com and I just had to ad a pop up window for a contest there running so that people don't miss out on it if they don't click on the "news" link. So the popup window contains a link to the "news" page - but when they click it I end up with two open pages. I mean it's okay that it goes to the news page in the front window and hides the other but, I know I don't like when a site opens up unecessary windows... so if anyone out there knows the quick fix I would love that!! Ultimately I would like to be left with one window showing news. Unless of course they don't click the link and just close the window themselves... Thanks[/QUOTE]How about the link in the popup executes:

"opener.location.href='theNewsPage.htm';self.close()"

Better yet, don't try to popup a window, as anyone with a usable browser won't see it. Display a cookie-regulated div instead.
Copy linkTweet thisAlerts:
@shieyaauthorFeb 08.2007 — I'm sorry as you can see I'm not a coder per say... I'm really a designer using dreamweaver with minimal coding skills... sounds to me like what your saying is that I can use this code "opener.location.href='theNewsPage.htm';self.close()" to close the window that just popped up?

I am a Mac user for many yrs used to work for Apple in fact... but code is just not my thing... I can go in and edit stuff but only when it's already in place... and I'm used to flash where you can do things like say 'close this window' and go to this "URL" Sorry if I don't make sense it's late and I have been at this all night! So basically all I want to do is make it so that when someone clicks on that link "click here" (on the pop up) that we end up with only one window open! So sorry... this is just not my thing but I'm under a crunch...

http://www.biciconcepts.com
×

Success!

Help @shieya 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.8,
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,
)...