Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Dec 2011
    Thanked 0 Times in 0 Posts

    JavaScript - Access is Denied error

    I have two servers jboss and ejabbered and i have deployed two html files, one on each as follows:

    testdirver.html deployed on ejabbered
    function viewmembers()
    {var w=window.open("");}
    <body><form name="sub" >
    <input type="text" id="to" name="to">
    <button onClick= "viewmembers();">

    test.html on jboss
    function abc()
    <body onload=abc();></body></html>

    Problem: window.opener.document gives the js error "Access is Denied" which i am not able to understand.

    Exchanging the two files on the servers(i.e. testdriver.html on jboss and test.html on ejabbered works fine and i get the output [object]). So i am guessing there is something that has to do with the ejabbered server

  2. #2
    Senior Coder
    Join Date
    Dec 2010
    Thanked 570 Times in 563 Posts
    No, nothing about the server but rather about the client. Browser policy prevents a page coming from one domain/subdomain/protocol from accessing information from another page coming from a different domain/subdomain/protocol

    Possible solution: Server side proxy (on your server) that opens a remote URL and outputs to your script. Then the script "thinks" that the information is coming from the same server


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts