/    Sign up×
Community /Pin to ProfileBookmark

Pop Up Problem

I’m using Javascript in flash 8. The problem is with the Javascript, and my lack of knowledge of javascript.

I have a gallery section on my website that opens up centered pop up windows for particular sections: [url]www.aemeth.net/gallery.html[/url].
It works fine if you close the pop up before trying to open another, but if you try to open another with one open it doesn’t work anymore, it just brings the one you already have open to the front.
in frame 1 I have this:

_root.openWinCentre = function(url, winName, w, h, toolbar, location, directories, status, menubar, scrollbars, resizable) {
getURL(“javascript:var myWin; if(!myWin || myWin.closed){myWin = window.open(‘”+url+”‘,'”+winName+”‘,'”+”width=”+w+ “,height=”+h+”,toolbar=”+toolbar+”,location=”+loca tion+”,directories=”+directories+”,status=”+status +”,menubar=”+menubar+”,scrollbars=”+scrollbars+”,r esizable=”+resizable+”,top=’+((screen.height/2)-(“+h/2+”))+’,left=’+((screen.width/2)-(“+w/2+”))+'”+”‘)}else{myWin.focus();};void(0);”);
};

On each button I have this:
on (release) {
//customize the window that gets opened
// 0 equals NO.
// 1 equals YES.
address = “http://www.aemeth.net/paintings“;
target_winName = “PAINTINGS”;
width = 700;
height = 550;
toolbar = 0;
location = 0;
directories = 0;
status = 0;
menubar = 0;
scrollbars = 0;
resizable = 0;
//sends data back to the function
openWinCentre(address, target_winName, width, height, toolbar, location, directories, status, menubar, scrollbars, resizable);
}
Does anyone konw how to make it either replace the url in the open window or just pop up another window?
THanks.

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

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