/    Sign up×
Community /Pin to ProfileBookmark

Hello,

Whenever I open a popup, the text in the parent window seems to become more and more visually distorted. I’m wondering if there’s something in (or not in) my script that is causing it.

My (large) popup script …

[CODE]var attributes;
var date;
var number;
var count;
var sonic = 0;
var photo = 0;
var video = 0;
var help = 0;

function PopUp(url, name, width, height) {
attributes = ‘width=’ + width + ‘, height=’ + height + ‘, top=0, left=0, location=0, toolbar=0, scrollbars=0, status=0, menubar=0, resizable=0’;
date = url.substring(29, 39);
number = url.substring(47, 49);
if (name == ‘sonic’) {
if (!sonic.closed && sonic.location) sonic.focus();
else sonic = window.open(url, name, attributes);
}
else if (name == ‘photo’) {
if (!photo.closed && photo.location) {
if (photo.date != date || photo.number != number) {
photo.date = date;
photo.number = number;
photo.count = count;
photo.ShowPhoto();
}
setTimeout(‘photo.focus();’, 0);
}
else photo = window.open(url, name, attributes);
}
else if (name == ‘video’) {
if (!video.closed && video.location) {
if (video.date != date || video.number != number) {
video.date = date;
video.number = number;
video.ShowVideo();
}
setTimeout(‘video.focus();’, 0);
} else {
video = window.open(url, name, attributes);
PlayTrack(‘false’);
}
}
else if (name == ‘webcast’) {
if (!video.closed && video.location) {
video.ShowWebcast();
video.focus();
} else {
video = window.open(url, ‘video’, attributes);
PlayTrack(‘false’);
}
}
else if (name == ‘help’) {
if (!help.closed && help.location) help.focus();
else help = window.open(url, name, attributes);
}
}[/CODE]

Ideas? Is it a return true; return false; return; issue?

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

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