Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language

Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

Javascript / Client Side Development

Error: uncaught exception: Permission denied to get property Window.processXML

Hi -
I have some javascript that works when I run it from a server, but I
need to run it locally. When I try to execute it locally I get the
following error:
Error: uncaught exception: Permission denied to get property
Is there a way to get around this issue?

  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<TITLE>Exercise #3 - Request/Response Application</TITLE>

<!-- frames -->
    <FRAME NAME="InputFrame" SRC="InputForm.htm" >
    <FRAME NAME="PostFrame" SRC="postForm.htm" SCROLLING="no"


<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <TITLE>Input Form</TITLE>
 <SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript">

                // Global variables that get set when the frames are loaded
                var theInputFormOBJ;
                var theHost;

                //function that populates global variables
                function init(){
                        theInputFormOBJ = document.theInputForm;
                        theHost = "bugjuice";

                        //set default host and ArcIMS Service values
                        theInputFormOBJ.Service.value = "test2";
                        theInputFormOBJ.Host.value = theHost;

                // clear the response box
                function clearResponse() {
                        theInputFormOBJ.Response.value = "";

function sendXML() {
alert ("send XML");
                        //***Exercise 03, Step 05.2: Get the value of the service name and
the request from "theInputForm" and put
                        // them in variables called theService and theRequest respectively
                        var theService = theInputFormOBJ.Service.value;
                        var theRequest = theInputFormOBJ.Request.value;

                        //***Exercise 03, Step 05.3: Construct the action for the
"theInputForm" and put the value in a variable
                        // called actionURL (HINT: The action is a URL made up of the host
name and
                        //a call to the servlet.  The argument/value pairs that are
included in the
                        // URL are ServiceName, ClientVersion and Form).
                        var esrimapBlurb = "/servlet/com.esri.esrimap.Esrimap";
                        var cVersion = "?ClientVersion=9.0";
                        theService = "&ServiceName=" + theService;
                        var theForm = "&Form=True";
                        var actionURL = "http://" + theHost + esrimapBlurb + cVersion +
theService + theForm;
alert (actionURL);
                        //***Exercise 03, Step 05.4: Use the DOM to get the form object in
the PostFrame and store it in a variable
                        // called thePostFormOBJ
                        var thePostFormOBJ = parent.PostFrame.document.forms[0];

                        //***Exercise 03, Step 05.5: Set the action attribute of
thePostFormOBJ to be the value of the actionURL
                        // variable that you populated earlier.

                        //***Exercise 03, Step 05.6: Set the XMLRequest INPUT element of
thePostFormOBJ to
                        // be the value of the theRequest variable that you populated
                        thePostFormOBJ.ArcXMLRequest.value= theRequest;

                        //***Exercise 03, Step 05.7: Set the JavaScriptFunction attribute
of thePostFormOBJ to
                        //be "parent.InputFrame.processXML".
                        thePostFormOBJ.JavaScriptFunction.value =

netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserAccess" )
netscape.security.PrivilegeManager.enablePrivilege("UniversalPreferencesRea d")
netscape.security.PrivilegeManager.enablePrivilege("UniversalPreferencesWri te")

                        //***Exercise 03, Step 05.8:  submit thePostFormOBJ

                function processXML(theReply){
                        //***Exercise 03, Step 06.1: Update the text area with the response
                        theInputFormOBJ.Response.value = theReply;


                function writeGetImage(){

                        //Build GET_IMAGE request

                        //<?xml version="1.0" encoding="UTF-8" ?>
                        //<ARCXML version="1.1">
                        //<GET_SERVICE_INFO renderer="false" extensions="false"
fields="false" />

                        var getImageReq = '<?xml version="1.0" encoding="UTF-8" ?>\n';
                        getImageReq = getImageReq + '<ARCXML version="1.1">\n';
                        getImageReq = getImageReq + '<REQUEST>\n';
                        getImageReq = getImageReq + '<GET_SERVICE_INFO renderer="false"
extensions="false" fields="false" />\n';
                        getImageReq = getImageReq + '</REQUEST>\n';
                        getImageReq = getImageReq + '</ARCXML>';

                        //Put request in Request text area
                        theInputFormOBJ.Request.value = getImageReq;


<BODY BgColor="#CCCCCC" onLoad="init()">
<FORM name="theInputForm">
 Host: <INPUT TYPE="Text" NAME="Host" VALUE="" size="20">&nbsp;&nbsp;
 ArcIMS Service: <INPUT TYPE="Text" NAME="Service" VALUE="" size="20">
 <TEXTAREA COLS=80 ROWS=15 NAME="Request" WRAP="soft" ></TEXTAREA><BR>

 <!--***Exercise 03, Step 05.1:  Use an onClick event in this element
to call a function named sendXML().  -->
 <INPUT TYPE="button" NAME="theSendButton" VALUE="Send Request"
<INPUT TYPE="button" NAME="getImage" VALUE="Get Map Service"
 <TEXTAREA COLS=80 ROWS=10 NAME="Response" WRAP="soft"></TEXTAREA><BR>
 <INPUT TYPE="button" NAME="theClearButton" VALUE="Clear Response"

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <TITLE>Post Form</TITLE>

<!--***Exercise 03, Step 03.2:  Use the FORM element to create a form
with an empty action attribute and a method
attribute that has a value of POST-->
        <FORM action="" method="POST">

<!--***Exercise 03, Step 03.3: Create 4 hidden INPUT elements  -->

                <INPUT TYPE="Hidden" NAME="ArcXMLRequest" VALUE="">
                <INPUT TYPE="Hidden" NAME="JavaScriptFunction"
                <INPUT TYPE="Hidden" NAME="BgColor" VALUE="#CCCCCC">
                <INPUT TYPE="Hidden" NAME="FormCharset" VALUE="UTF-8">

On May 12, 2:23 am, funktacu@gmail.com wrote:

It's a cross domain issue. You can't access the document of a frame if
it's loaded from a domain that's different from the original page
location. The are hacks to get around it, but it's there as a security
protocol, so someone can't use JavaScript to transmit, say a password
when you enter it on another Web site.
On May 11, 10:55 pm, Daz <cutenfu@gmail.com> wrote:

So it sounds like the issue locally is that I don't have a domain when
the source is say file://C:/js/files/deafult.htm. Does that sound
Does one of the hacks involve using 'document.domain'? Could you point
me in the right direction to track down a hack that would allow me to
run locally instead of from a server?
Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc