473,406 Members | 2,293 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Permission denied when accessing function in parent window

My child window has this script. "temp" is simply the value of the
select list which I am passing onchange. I get a permission denied
error in IE when executing selectOption.

function selectOption(temp){
if(temp == ''){
alert('You have not made a selection. Please make a selection
to continue.');
return false;
}
else
{
opener.setValues(temp);
window.close();
}
}

I launched the window with the following script from the main window:

function newWindow(myurl,mywidth,myheight,resize) {
var myDate=new Date();
var myTime=myDate.getTime();
var URL=(myurl.indexOf('?') > -1)?myurl + '&time=' + myTime:myurl +
'?time=' + myTime;
var w=mywidth;
var h=myheight;
var winname='popWindow';
var winl = (screen.width - w) / 2, wint = (screen.height - h) / 2;
var
winresize=(resize=='resize')?'scrollbars=yes,resiz able=yes':'scrollbars=no,resizable=no';
var winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl +
',toolbar=no,status=no,menubar=no,' + resize;
if(win==null || win.closed)//only launch window if it doesn't already
exist
win=window.open(URL, winname, winprops);
win.focus()
document.onclick=winfocus;//set method to bring window into focus
}

Mar 7 '06 #1
3 9994
Last time I had a similiar issue was when the opener and popup scripts
were on different domain (even subdomain).
It could be that, or something else.. Just out of curiosity, what does
setValues function do on the opener script??

Mar 7 '06 #2
It is all the same domain...even the same application...which is why it
driving me crazy. Set values simply splits the value passed back and
assigns it to some form fields.

Mar 7 '06 #3
Found the issue, there was a linked JavaScript file in the main page
which was setting document.domain='SOMETHING'; If I added that to the
popup too, all is well.

Mar 7 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: whidbeywave | last post by:
Hi Gurus, I belive this has been asked several times with its own twist. Still after reading newsgroup and KB articles like 241754,I am clouded, with options. Please help in giving me direction. ...
21
by: alistair_henderson | last post by:
Morning All, I have some code for a website which uses 'window.open' to simulate modal dialog boxes. I use the window.closed property to decide if the window object exists at various points. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.