0
I am facing a problem already known by many, in IE it is possible to use Activex to get the user logged in to the network.
In Chrome this is not possible and after many searches I got the same answer.
I know there is a library in Java that can get this information independent of the browser, but the project is too small and I don’t have all the understanding to use the whole structure of Java, so it should be developed in PHP even using a simple server with Tomcat.
As solution attempt was developed a URL using Java that returns the user and only the user even more nothing.
However I can not handle this information tried via load, ajax, json, jsonp, but always return me an impossibility access.
Via $("p").html('<object data="url/login" />')
I can print the information on the page but I can’t convert to string to use it.
If someone can give me a light as a solution to this would be very grateful. Thank you.
The return of Object was in html even though I confused :). Now when running ajax the console returns me the message: GET http://server2/User/id?=1473351041784 user.php:1 Xmlhttprequest cannot load http://server2/Usuario/id?=1473351041784. No 'Access-Control-Allow-Origin' header is present on the requested Resource. Origin 'http://server1' is therefore not allowed access. The Response had HTTP status code 401. I am on server 1 and trying to perform ajax in 2 there is some specific release that should be done there?
– Cleverson
If used jsonp the console returns - id? callback=jQuery1122019...1473351903903&=1473351903904:1 Uncaught Syntaxerror: Invalid or Unexpected token - and by clicking on the link I can see the result on the console.
– Cleverson
@Cleverson I did not speak jsonp I spoke json, they are two different things. Tell me your return is json even? Because if it’s not there’s no point in using dataType
– Guilherme Nascimento
@Cleverson on the
Access-Control-Allow-Origin
, this error occurs due to different sources, please read more on: http://answall.com/search?q=Access-Control-Allow-Origin– Guilherme Nascimento
Because I am on a different server I believe that is why json gives HTTP error, I will read there.
– Cleverson