Javascript opener window error

Hello all...

I am ripping out my hair with this.  I need to do a window.opener.runMyfunction(); and pass variables to a parent. I keep getting this error and I don't understand why.

Unsafe JavaScript attempt to access frame with URL https://www.somesite.com/consultants/party_booking.php?action=edit&evtid=129ecb11-f891-8f1b-5934-48f75ed114b5&osCsid=b2oheur9k68d62i8kig1uauu0klgb46f from frame with URL https://www.somesite.com/consultants/selphp.html. Domains, protocols and ports must match.

Both pages are over SSL, both on the same domain, both in the same path... Why is this thing bugging out??

The function is defined on the party_booking.php page and the popup is calling "window.opener.theFunction('sid', 'name'); " and getting this error.  I can't figure where the heck I am going wrong.

In the end I need this to work on FF3.x, IE, and Safari... but I don't see this as so complex.
BTW... It runs just fine when everything is on localhost.

Thanks!  -Cheers, Peter.
LVL 5
ein_mann_betriebAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

flipzCommented:
Call you post the window.open code? Could it have to do with one file being php while the other html? Can you try creating a php version of the selphp.html file and call that one to see if that works?
0
ein_mann_betriebAuthor Commented:
Hi flipz,
  popupRefSel is called from a button on the parent page.  That opens a pop-up window where there are multiple entries and select buttons.  When a select button is pressed "window.opener.doSelect("some sid", "some name");" is called.  This is where the error is registered.  The selphp.html was for testing purposes... the live code (as shown in the commented line below) is a php page with a different GET string.  But this didn't work and I was using the html page just for testing to save constantly running soap queries on my select window.

Thanks!  -Cheers, Peter.

  function popupRefSel() {
    window.open('selphp.html','popupRefSel','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=500,height=500,screenX=150,screenY=150,top=150,left=150')
//    window.open('party_booking.php?action=refsel','popupRefSel','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=500,height=500,screenX=150,screenY=150,top=150,left=150')
  }
 
  function doSelect(sid, snme){
alert(sid);
	document.party_form.referred.value = sid;
	document.party_form.referred_name.value = snme;
  }

Open in new window

0
flipzCommented:
Which browser(s)/versions are you getting this error in? all of them?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

ein_mann_betriebAuthor Commented:
I have FF 3.x and Safari for testing... I only have third hand info on IE 7.
And Yes the errors occur on both.

Thanks.  -Cheers, Peter.
0
flipzCommented:
Everything that I can find on this issue points to browser bugs. Haven't found any potential fixes yet - you can try a wild guess here. Call the window.open using an absolute path such as:

window.open('/consultants/selphp.html');

I'll post any more thoughts.... if I have any!
0
ein_mann_betriebAuthor Commented:
Flipz,
   Yea... tried that and it didn't work.

I am trying to set the values right from the window.  It didn't work in the beginning, but it seems to work now.  Here is what I am using:
  window.opener.document.party_form.referred_name.value = snme;
  window.opener.document.party_form.referred.value = sid;

I just don't understand why this didn't work to begin with...
Arg.  -Cheers, Peter.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.