post

ASP.NET MVC 2: Better way to handle multiple buttons in each HTML table row?

I have an HTML table where each row has buttons which toggle status bits in the database for each row. Assuming Javascript is not an option, what would be the "best practice" way of handling this? I'm currently handling it by wrapping each row in a form like this: <table> <tr> <td> <form action="/FooArea/BarCont...

POST to server, receive PDF, deliver to user w/ jQuery

I have a link that the user clicks to get a PDF. In jQuery, I create a POST ajax call to the server to get the PDF. The PDF comes to me with the correct content headers etc that would normally cause the browser to open the Reader plugin, or allow the user to save the PDF. Since I am getting the PDF w/ an ajax call, I'm not sure what t...

PHP Validation - passing http POST values forwards to a 3rd party checkout

I don't know whether this is possible, I can't seem to find any other help guides so this may not be possible... I have a checkout page which POSTs a load of variables forwards to a 3rd party payment processor (WorldPay). I want to know if it is possible to put a PHP script of some sort inbetween the two pages for validation purposes. ...

How to send post data to any url (with redirection) without using curl or fsocket in php

Hello, I would like my page to be redirected to new url with some post data being sent to it. I don't want to use curl or fsocket because they will not redirect user to that new url. Is there any alternative for header("Location: blahblahblah"); to send post data? I tried with document.form.submit(); and it worked but some users are fa...

Post to entire document like a form using jquery?

Hi to all, i wan't to pass a variable without using get to php, so, i'm using post with jquery, but i can't write the result into the document (refresh all the page) here is the code: $.post("/"+$(this).attr("href"),{returnto:$(this).attr("rel")},function(a){$(document).html(a);});return false;}); ...

Binary $_POSTed filedata gets messed up

Hi, I am currently testing out the new client side resizing of SWFupload ( http://demo.swfupload.org/v250beta2/resizedemo/index.php ) It resizes the image on the client via flash before it gets uploaded. However, it sends it as a normal POST request with the image data as a binary string / application/octet-stream. I am able to acces...

Post soap request and display response in vb2008.net?

I'm new to object oriented programming so I just need help on the basics here. I have an xml string that I've tested in a separate program and is able to communicate with my soap server correctly. I'm trying to add a request in Visual Basic 2008 to essentially take the soap string, send it as an http POST, and display the xml that is r...

Pulling $_POST array elements into sequential variables with a common prefix

I have a $_POST array that results from selecting (in this case) 3 rows from a displayed HTML table in which each row has a checkbox. The IDs are unique identifiers for each row. Array ( [checkbox] => Array ( [0] => 001403166 [1] => 001407509 [2] => 001407541 ) ) I want to gathe...

XMLHttpRequest POST stuck at readyState 1 after several successive requests against IIS7+Windows 7 Pro

I'm using JavaScript to send textarea updates back to a server in real-time. My HTML page uses a single XMLHttpRequest object to POST data to the server asynchronously. The messages are sent potentially at every onKeyUp event, but because I only use a single XMLHttpRequest object I throttle the requests by only POSTing when the readySt...

POSTing Form Fields with same Name Attribute

If you have a form that POSTs to a PHP file and there are text inputs in the form with duplicate name attributes, will you still be able to obtain the values of both fields from the $_POST array? ...

More Ajax / MVC problems

This is a fairly recurring theme on StackOverflow, but once again I can't get my MVC controller action to recognise the data I'm trying to send. Any suggestions gratefully received. My controller action looks like this: [Authorize] [HttpPost] public JsonResult Record(int task, string notes, double hours) ...

C# HttpWebRequest Form Post with Progress Tracking (for uploading potentially large files)

I've got a winforms application I'm writing that posts files to a web application (not mine). I've got things working just fine as far as posting the files themselves go, my issue is that I'd like to provide some indication of how far along I am with the sending the request. The code below is my attempt to use BeginGetResponse to that ...

Sample code for POST + cookie?

Hello, I've been googling for some VB.Net code to authenticate to a web server with the POST method, receive a session ID in a cookie, and then send this cookie along with all GET queries... but all I found is half-working code or C# code, ie. difficult to use for a VB.Net newbie. Would someone have some code handy or some pointer that...

Restlet JUnit test that POSTs multipart form?

I'm working with Restlet 1.1.8 and am trying to write a Resource that parses a multipart form; it needs to allow upload of an Excel spreadsheet. I have the Resource working, when I run it from my web app it's doing The Right Things(tm) so far, but I want to write an acceptance test that POSTs via Java code so I can throw lots of test ca...

How can I send POST and GET data to a Perl CGI script via the command line?

I am trying to send a get or a post through a command-line argument. That is test the script in the command line before I test through a browser (the server has issues). I tried searching online, and I suppose I was probably using incorrect terminology because I got nothing. I know this is possible because I saw someone do it. I just don...

JavaScript: Sending POST, redirecting to response

I have an image with an onclick. When the click event fires, I want to send an HTTP POST and have the window.location redirect to the response to the POST. How can I do that? ...

MVC Post to another action

Strait to the details... I'm working on a personal project basically it's a task list. Anyways; I managed to get the standard Add, Edit, Delete a task functionality going good; now I'm stuck on something that I know must be very simple. I would like for users to be able to accept a task from the details page, now I could easily put that...

Slow upload speeds using HttpClient, Jame's Mime4j and HttpPost method of posting

I'm uploading a multipart chunk of data using HttpPost and feeding it into an HttpClient objects execute method as follows: HttpPost loginPost = new HttpPost(LOGIN_URL); List<NameValuePair> params = new ArrayList<NameValuePair>(); params.add(new BasicNameValuePair("_email", mEmailAddress)); params.add(new BasicNameValuePair("lpassword",...

Is it possible to send a user back a page after login?

I am a lazy programmer, i dont want to write dozens or hundreds of lines if i dont need to. Some actions such as posting a comment require login. It may timeout and the user may be redirected to a login page. With get data i can easily put the query in something like action=PrevPageUrlAndQuery. However with POST data i have to do someth...

synchronous AJAX post from unload event: how to ensure user sees most up-to-date information from DB on next page load

When a user requests to edit an entry in our CMS we 'lock' it so that nobody else can edit it simultaneously, we release the lock when they submit their changes. However we need to handle the case where the user leaves the page through other links... my first attempt is to use jQuery to fire a synchronous $.ajax() call on $(window).unlo...