tags:

views:

13

answers:

1

When I run my ajax file, a problem caused by XMLHttpRequestObject.open("GET", dataSource,true) occurs. It is said that " Access to restricted URI denied" code: "1012" ". Does anyone know the solution? Thanks in advance!

A: 

You are probably trying to access a file on another domain. This is forbidden in AJAX for obvious security reasons.

If the data source is one you control, try using JSONP in order to circumvent this restriction. Otherwise, you're out of luck for the most part, unless you want use server-side code to route the request through your own server.

Matchu
Beside JSONP, is there another way to deal with it?
Sinal