post

Do you need to worry about caching when using jQuery's $Post?

I know that $post() is a short hand for the ajax() in jQuery. I also saw that ajax() has a cache parameter that is true by default. My question is: Is it dangerous to use $post() to get back html from the server if you DON'T want caching since the default for ajax() caching is true? Or is a post never cached? I wasn't sure if it was ...

PHP post request to retrieve JSON

I'm trying to write some simple php code that will make a post request and then retrieve a JSON result from the server. It seemed simple to me, but the below code simply doesn't open a connection. $port = 2057; $path = "/validate/"; $request = "value1=somevalue&value2=somevalue&value3=somevalue"; $http_request = "POST $path HTTP/1.0\...

Jquery ajax call with '+' sign.

Hi, I'm doing this: $.ajax({ type: "POST", url: baseURL+"sys/formTipi_azioni",data:"az_tipo="+azione, beforeSend: function(){$("#form").html('<p><img src="'+baseURL+'lib/img/ajax-loader.gif" width="16" height="16" alt="loading" /><p>');}, success: function(html){$("#form").html(html);} }); there is a case when azione ...

How to send a JSON object over Request with Android?

Hi, I want to send the following JSON text {"Email":"[email protected]","Password":"123456"} to a web service and read the response. I know to how to read JSON. The problem is that the above jason object must be sent in a variable name jason. How can i do this from android? Like creating a request object setting content headers etc. ...

Re-send POST request easily - what tools?

I am looking for an easy way to re-send POST request to the server within the browser mainly for debug purposes. Say you have a XHR request which contains POST parameters that is to be send to the server. After having changed the script on the server side, you would like to resent the very same request for analyzing the output. What too...

Why qry.post executed with asynchronous mode?

Recently I met a strange problem, see code snips as below: var sqlCommand: string; connection: TADOConnection; qry: TADOQuery; begin connection := TADOConnection.Create(nil); try connection.ConnectionString := 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Test.MDB;Persist Security Info=False'; connection.Open(); qr...

PHP - getting content of the POST request

I have problem with getting the content. I don't know the names of the post variables so I can't do this using = $_Post['name'] because I don't know the "name". I want to catch all of the variables send by POST method. How can I get keys of the $_Post[] array and the values related with them? ...

How to pass values between asp.net pages with gridviews

Hi, I enabled the selection on my gridview. The question is, I can pass values with buttons but it seems redundant, because I have selection linkbuttons. So how can I pass variables with them ? ...

GET and POST on the same page?

EDIT: Answer found! Thank you very much people, a lot of answers worked, I chose the hidden field answer as it was easiest :D I am creating a commenting script and I came across a problem. I am having to use $_POST and $_GET on the same page, which I don't think makes sense. I am very new to php and am training myself. I have a page ...

hidden post parameter , php curl

I'm trying to replicate the browser post parameters on http://www.ebayclassifieds.com/m/PostAd?scrid=3465450-2253858851033189948 but for some reasons I can't find where the values for 2 of them are comming from . The parameters are btn-previwe-ad.x and btn-previwe-ad.y but I can't find such as parameters in the html source itself o...

Reading POST data from html form sent to serversocket.

i try to write simplest possible server app in Java, displaying html form with textarea input, which after submitting gives me possibility to parse xml typed in that textarea. For now i build simple serversocket based server like that: import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.PrintWriter; import ja...

Loading a Google Chart into page via POST request

So I have a page set up to use Google Chart API via POST requests. I have multiple charts to draw each with a submit button so that a user can view any chart they want. So it's working where pressing the submit will load the chart, but I want to improve that. Ideally, I'd like a way (submit button or link) to submit the form with java...

Uploading image to flicker in c++

I am creating an application in VC++ using win32,wininet to upload an image to Flickr.I am able to get Frob,Token correctly but when I try to upload the image I am getting error Post size too large. Headers are created as follows wstring wstrAddHeaders = L"Content-Type: multipart/form-data;boundary=ABCD\r\n"; wstrAddHeaders ...

Posting null values via AJAX

Using the jQuery $.post function, if you send a null value, it arrives at the server side as "null". Example: Javascript: $.post('test.php', { foo : null }); PHP: var_dump($_POST['foo']); // string(4) "null" I understand why this is so, but was wondering the best way to work around the limitation? Should you: Loop through all th...

delphi vs c# post returns different strings - utf problem?

I'm posting two forms - one in c# and one in delphi. But the result string seems to be different: c# returns: ¤@@1@@@@1@@@@1@@xśm˱Â0Đ... delphi returns: #$1E'@@1@@@@1@@@@1@@x'#$009C... and sice both are compressed streams I'm getting errors while trying to decompress it... The C# is 'correct' - ie. extracts. I'm not an expert on delp...

PHP - Redirect and send data via POST

I have an online gateway which requires an HTML form to be submitted with hidden fields. I need to do this via a PHP script without any HTML forms (I have the data for the hidden fields in a DB) To do this sending data via GET: header('Location: http://www.provider.com/process.jsp?id=12345&amp;name=John'); And to do this sending data...

echo POST array.. or other ideas?

Update: As seen in the Original Questions below, I am looking to echo an array. The problem is that when I send the Moneris gateway to return a POST array to my new file (cart.php) it gets a 500 Internal Server Error. This is the same error I received when it send to the script, which should have worked. Is there any reason that it wou...

Java: Handling cookies when logging in with POST

I'm having quite some trouble logging in to any site in Java. I'm using the default URLconnection POST request, but I'm unsure how to handle the cookies properly. I tried this guide: http://www.hccp.org/java-net-cookie-how-to.html But couldn't get it working. I've been trying basically for days now, and I really need help if anyone wants...

How to Ignore query string in a URL?

Hello I have something like this: if(isset($_POST['btnProm'])){ $idads = mysql_real_escape_string($_POST['idAds']); require_once("adPromFrm.php"); } When a button is pressed, a form will appear.... When i refresh the page, the form doesn't disappear, but when i click a link with a query string (thisPage.php?lang=fr...), the...

WCF Restful services getting error 400 (bad request) when post xml data

I am trying to self host a WCF services and calling the services via javascript. It works when I pass the request data via Json but not xml (400 bad request). Please help. Contract: public interface iSelfHostServices { [OperationContract] [WebInvoke(Method = "POST", UriTemplate = INFOMATO.RestTemplate.hello_post2,RequestForma...