/    Sign up×
Community /Pin to ProfileBookmark

Access Denied – ???

Hello,

I have a function in a php file that opens a new window, passing a var
to another function (after a short delay), and the seconf fucntion supposed
to write data in the opened window.

Everything goes well with opening the window, but I get an error: access denied, why?

I have tested it locally and it works, but on the server it doesn’t.

Here are the functions:

function opwin (iml) {
gp = iml;
if (!galwin || galwin.closed) {
galwin = window.open “http://pogd.co.il/pu.html“,
“twin”,”height=400,width=400,toolbar=no,scrollbars=no”);
setTimeout(“mtjd(gp)”, 50);
} else if (galwin.focus){
galwin.focus();
}
}
function mtjd(timga){
galwin.document.write(‘<img src=’+timga+’/>’);
}

Thanks,
A.O

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@_Aerospace_Eng_Nov 02.2006 — Is http://pogd.co.il/pu.html on your server or is it on a different server?
Copy linkTweet thisAlerts:
@avihaiorelauthorNov 02.2006 — Same home directory.
Copy linkTweet thisAlerts:
@_Aerospace_Eng_Nov 02.2006 — I do see an error in your JS here
function opwin (iml) {
gp = iml;
if (!galwin || galwin.closed) {
galwin = window.open [b]([/b]"pu.html","twin","height=400,width=400,toolbar=no,scrollbars=no");
setTimeout("mtjd(gp)", 50);
} else if (galwin.focus){
galwin.focus();
}
}
function mtjd(timga){
galwin.document.write('&lt;img src='+timga+'/&gt;');
}
×

Success!

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