/    Sign up×
Community /Pin to ProfileBookmark

Centered pop in Netscape 7.02

Hi all,

I have a little problem and don’t know how to solve it:
I want to open a popup when the user clicks on a link. It works fine with IE, but NS opens the popup in fullscreen mode… I don’t understand!!!

And I used a sample code I found on JavaScriptSource: the sample code works fine with both IE & NS on the JSSource site, but not on mine.

Here is the code I use:

function openContent(theLink) {
var theLeft = 150;
var theTop = 150;
var theWidth = screen.width – 300;
var theHeight = screen.height – 300;
var windowParameters = ‘toolbar = yes, location = yes, directories = no, status = no, menubar = no, scrollbars = yes,resizable = yes, width = ‘ + theWidth + ‘, height = ‘ + theHeight + ‘, left = ‘ + theLeft + ‘, top = ‘ + theTop + ‘, resizable’;
var scriptParameters = “linkdet.php?id=” + theLink;
filesWindow = window.open(“”, “Link”, windowParameters);
filesWindow.close();
filesWindow = window.open(scriptParameters, “Link”, windowParameters);
}

and the link I use looks like this:

<a href=”links.php” onClick=”openContent(‘6da1543a64’);return false” class=”LienFicheMin”>[more]</a>

The parameter I use in the openContent() function is a db resource id I use in the linkdet.php script to retrieve data.

The page can be seen at [URL]http://www.eurotra.belbone.be/links.php[/URL]

Can somebody help me???

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@gil_davisJul 21.2003 — [b]var windowParameters = 'toolbar = yes, location = yes, directories = no, status = no, menubar = no, scrollbars = yes,resizable = yes, width = ' + theWidth + ', height = ' + theHeight + ', left = ' + theLeft + ', top = ' + theTop + ', resizable';[/b][/quote]Netscape does not like whitespace in the features string. Try this:
var windowParameters = 'toolbar=yes,location=yes,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width='
+ theWidth + ',height=' + theHeight + ',left=' + theLeft + ',top=' + theTop;
Copy linkTweet thisAlerts:
@manuauthorJul 21.2003 — Thanks a lot: it works OK!!!

And I'll remember it for my future scripts!
×

Success!

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