Re: PHP to AngularJS - Permission Denied to access property

2013-01-24 Thread Boris Zbarsky

On 1/23/13 3:39 PM, edgar.am...@gmail.com wrote:

also, the the angularJS app is in my localhost port 81, the php file is in my 
localhost, different port.


Then they're not same-origin and can't call back and forth directly.

I suggest using postMessage to send the data across.

-Boris

___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: PHP to AngularJS - Permission Denied to access property

2013-01-24 Thread Mounir Lamouri
On 23/01/13 20:39, edgar.am...@gmail.com wrote:
[...]
> also, the the angularJS app is in my localhost port 81, the php file is in my 
> localhost, different port. 

You are very likely being stopped by a cross-origin check. Try to run
both code within the same origin [1] and see if that works.

[1] That means, same protocol, domain and port.

--
Mounir
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


PHP to AngularJS - Permission Denied to access property

2013-01-23 Thread edgar . amaro
I am developing an AngularJS web app. We are transitioning from php. There is a 
part in this app where there is a list of people and an "add person" button. if 
you click on someone the app should take you to a prefilled form. if you choose 
to add someone new then it takes you to the same empty form. in the form theres 
an option where you can click a magnifying glass, select a person and fill out 
all the info. this was all done with javascript (window.opener) using parent 
and child windows.

Heres the tricky part. I have developed the form in angularjs and stripped all 
php from it. i fixed it to where when you click on the magnifying glass it 
would open the .php list of people in a new window. I created 2 javascript 
functions. a "getValueFromChild" in the parent window and a "sendValueToParent" 
in the child window which is the php file.

but everytime i run it, it opens the window. and when i click on someone so it 
can call the sendvaluetoparent function firefox gives me an error


Error: Permission denied to access property 'GetValueFromChild'
[Break On This Error]   

self.opener.GetValueFromChild(ptid);
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform