Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Oct 2003
    Location
    SC
    Posts
    936
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Error: uncaught exception: Permission denied to get property HTMLDocument.getElements

    newdoc = "";
    function Create(){
    newdoc = window.open('sURL_here', true);
    }
    function Change(){
    alert(newdoc.document.getElementsByName("top").value);
    }


    when I call the change function I get this error: Error: uncaught exception: Permission denied to get property HTMLDocument.getElementsByName

    how can I fix this, get around it???

    thanks

  2. #2
    Regular Coder
    Join Date
    Feb 2005
    Posts
    400
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Is sURL in the same domain as your page? Cross-site scripted interaction is generally not allowed. Plus, getElementsByName returns a collection, not an element -- use newdoc.document.getElementsByName("top")[0].value or similar.

  3. #3
    Regular Coder
    Join Date
    Oct 2003
    Location
    SC
    Posts
    936
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks


 

Posting Permissions

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