/    Sign up×
Community /Pin to ProfileBookmark

window.close in frames- firefox

Hi,

I have 2 frames And in my left menu …I have a logout button..

When the user clicks on the logout button,it should close the window.

It is working fine in IE but in firefox it is not…

Regards

to post a comment
JavaScript

6 Comments(s)

Copy linkTweet thisAlerts:
@ShampieFeb 07.2008 — hard to make out what you did without code.. ?
Copy linkTweet thisAlerts:
@oxygenanauthorFeb 08.2008 — Hi,


Code is
<i>
</i> function funLogOff(){
var y = window.confirm("Do You Want to Log Off !!!");
if (!y) {
return false;
} else {
window.parent.close();
}
}



Regards
Copy linkTweet thisAlerts:
@felgallFeb 08.2008 — Did you use JavaScript to open the parent window in the first place? If not then you are not allowed to close it.
Copy linkTweet thisAlerts:
@oxygenanauthorFeb 08.2008 — No...

there are 2 frames..and the event is triggered when the user clicks on one of the links in one of the frames..
Copy linkTweet thisAlerts:
@ShampieFeb 09.2008 — perhaps put a onBlur event with self.Close() function on it ?
Copy linkTweet thisAlerts:
@felgallFeb 09.2008 — perhaps put a onBlur event with self.Close() function on it ?[/QUOTE]

That probably will not help much as few browsers support onblur on windows since the standards say that onblur is only valid for form fields and links. It may fix it for Firefox but the problem will still be there for other brwsers.
×

Success!

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