0

I am building a web app using javascript (client and server) in which I want to send information to the server, but I don't want to send it in the URL, so I want to use a POST message.
The thing is the server should redirect me based on that information I am sending, but as I am not using GET the new page will not load.
Any suggestions?

OtoLeo
  • 363
  • 3
  • 19
  • "as I am not using GET the new page will not load" - that shouldn't matter, or I totally don't understand the problem. Your server side script should be able to redirect the client wherever you need. – James Mar 10 '16 at 23:59
  • I think he wants to get the URL he is redirecting to from the header. – TheDude Mar 11 '16 at 00:00
  • Possible duplicate of [Accessing the web page's HTTP Headers in JavaScript](http://stackoverflow.com/questions/220231/accessing-the-web-pages-http-headers-in-javascript) – TheDude Mar 11 '16 at 00:02

1 Answers1

1

I presume you're using an ajax method to send the data? if so on the success function just add a:

document.location='http://www.google.com'

if you post some code it'll be easier to help though

cshelswell
  • 83
  • 2
  • 11