CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   Ajax and Design (http://www.codingforums.com/forumdisplay.php?f=55)
-   -   Xhr Getresponseheader (http://www.codingforums.com/showthread.php?t=243010)

ballot 11-05-2011 08:47 PM

Xhr Getresponseheader
 
http://stackoverflow.com/questions/8...-a-xhr-request

may anyone solve this:confused:

hdewantara 11-06-2011 06:03 PM

Havent tested this, but probably something like the following would do?
PHP Code:

http4['onreadystatechange'] = function () {
  if (
http4['readyState'] == 2) { // headers received
    
if (http4['status'] == 302) { // a http redirection
      
alert(http4.getResponseHeader("Location"));
      ...
    }
  }
}; 

Ref: http://www.w3.org/TR/XMLHttpRequest/

ballot 01-30-2012 06:11 PM

no it can't read the header so is there any other way to learn where have i navigated :confused:


All times are GMT +1. The time now is 01:25 AM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.