Fetching data from redirected page lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- IndianaJones · 2012-03-06 15:23 Hi all, I have encountered a problem with fetching data from a page which is redirected another page with javascript. When I send the request message everything seems okey with the responded HTTP/1.1 200 message. But the contents of the text/html consists of the following message.  var redirect=window.parent.location.href;\n  var reqURL="/portal/login.jsp?request_url="+redirect;\n  location.href=reqURL;\n So How can i get the redirected page URL to fetch the real data from the web page. By the way I am using synapse unit. Thanks. ---------------------------------------------------------------------- Leledumbo · 2012-03-06 22:54 QuoteSo How can i get the redirected page URL to fetch the real data from the web pageFollow where the page gets redirected to, which is reqURL in the response of the request you gave. ---------------------------------------------------------------------- ludob · 2012-03-07 08:30 Quotevar redirect=window.parent.location.href;\n  var reqURL="/portal/login.jsp?request_url="+redirect;\n  location.href=reqURL;\n So How can i get the redirected page URL to fetch the real data from the web page.When the page you retrieved is Code: [Select]http://www.l azarus.freepascal.org/index.php/topic,16226.msg87829.html the redirected page becomesCode: [Select]newurl:='http://www.lazarus.freep ascal.org/portal/login.jsp?request_url=' +     encodeurl('http://www.lazarus.freepascal.org/index.php/topic,16226 .msg87829.html')EncodeURL can be found in Synacode. ---------------------------------------------------------------------- IndianaJones · 2012-03-07 23:16 Thanks all, I will try and reply the result. Thanks again.