/    Sign up×
Community /Pin to ProfileBookmark

Control if the popup with a name is open

Excuse me for my english…
I want control if the popup with name “Contatto” is open
only if it not open i want open it.

i use window.open for open popup.

Thanks.

to post a comment
JavaScript

5 Comments(s)

Copy linkTweet thisAlerts:
@KorMay 27.2005 — try

if(!mypop){

var mypop = window.open(.......);

}
Copy linkTweet thisAlerts:
@romalucaauthorMay 27.2005 — I try it

i resfresh the page each 90 seconds.

Then mypop not visible at the reload.
Copy linkTweet thisAlerts:
@CharlesMay 27.2005 — Perhaps this is what you want:[code]<script type="text/javascript">
onload = function () {window.open ('http://www.webpagesthatsuck.com/', 'child')}
</script>
Copy linkTweet thisAlerts:
@KorMay 27.2005 — probably:
[code=php]
<script type="text/javascript">
onload=function(){
if(!mypop){var mypop = window.open(.......);mypop.focus();}
else{mypop.focus();}
}
</script>
[/code]
Copy linkTweet thisAlerts:
@romalucaauthorMay 27.2005 — The problem is that the popup (that is a chat) don't must to load every time on load of page.

But on reload page i control if there is activity in chat and if so i load the popup if it isn't exist.
×

Success!

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