Js redirect using $_post array?
I've got the following, which uses $_GET array, and I'd like to make it use $_POST instead:
location.href="webpage1.php?my_fieldname=" + (my_fieldvalue);
Thanks Kor. I'm looking into xmlhttprequest. It seems like quite a bit of work and there are apparently cross-browser issues to deal with also.
Originally Posted by Kor
I am submitting the page back to the server, so it's not like I need to transmit back to the server in the background.
method is a FORM's attribute which can not be "mimed" nor sent within the address bar. You may pass the pairs name|value within the address bar as if you have submitted them using GET method, but this is possible only because the default submit method is GET, and the processing agent is instructed to take that into consideration. But the POST method is something else: it sends this information to the processing agent within the FORM's body itself or by the request object's argument. By short: either you use a classical submit action or you use the http request/ ActiveX object (with AJAX) in order to perform a POST submit.
Last edited by Kor; 03-24-2010 at 12:59 PM.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)