简体   繁体   中英

'Permission Denied' when trying to make Jquery $.ajax request

function populateGroups(){
var p =1;
var groupNames = new Array();
$.ajax({
        type: "GET",
    url: "http://okcmonprd103/iMon/findgroups.pl",
    dataType: "text/xml",
    success: function parseGroupNames(xml){

            $(xml).find('group').each(function(){
                    groupNames[p] = $(this).find('name').text();
                    p++;
            });
            groupNames.sort(arraySort);
            for(p=0;p<groupNames.length-1;p++){
                $('#Groups').append('<option value="'+p+1+'">'+groupNames[p]+'</option>');
                $('#dutyGroups').append('<option value="'+p+'">'+groupNames[p]+'</option>');
                }
    }
});

}

I send this ajax call to a server on our network that runs a Perl script that returns XML data. This works fine on my machine in IE8, and in my Windows 7 Gadget (which is what this is mainly for) but whenever other people in the company try to use it, they get the "Permission Denied" error. Do I need to set up a proxy page in order to make this work?

It does work on my machine, I just don't see how other people on the same network wouldn't be able to use this...

It turned out that it was a Windows 7 issue. When you right clicked on the HTML file name, under security, it would say something like "this file is blocked because it came from another computer"

All you had to do was press the "Unblock" button and all of a sudden it worked.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM