post

Json isn't returning a result that is accessible as an array...

I'm having troubles reading a Json result back from a controller method... I have this method in my controller: [AcceptVerbs(HttpVerbs.Post)] public JsonResult GetCurrent() { IList<string> profile = new List<string>(); profile.Add("-1"); profile.Add("Test"); profile.Add(""); return t...

how to post a dynamically created fields in a table using jquery / asp.net mvc

I have a button that will create a new entry (row in a table) dynamically using jquery. Each entry is a row in a html table. for each row, each column has an input (textbox, radio button, checkbox) etc. because you can add as many rows as you like you end up with some array or collection of these rows. When i post the form, i dont ...

do you have to qualify control property names when using the default asp.net mvc model binder

let say your controller action looks like this: public ActionResult Update(Car myCar) { } if you have a textbox that has <input type='text' name='year' value='1990'> it seems like it will bind to the myCar.year field just fine but if you have nested objects or complex lists, etc, it seems like you have to qualify the names of con...

Make WordPress sticky posts behave as normal using caller_get_posts=1 isn't working

I'm making a specific single.php template. It's using a jQuery slider to slide from one post to the next. In order to show the right post first, I have to use 2 loops - one to call the first single post, and then another loop to call all the other posts in the category. This I do like this (might be a bit mucky, I'm no PHP guru) <ul id...

Why does fsockopen have performance problems and not fopen when sending a POST request in PHP?

I have tried two different implementations for simulating POSTing a form. One uses fsockopen (example here: http://www.faqts.com/knowledge_base/view.phtml/aid/7962) and the other uses fopen (example here: http://netevil.org/blog/2006/nov/http-post-from-php-without-curl). I ran into some serious performance problems with fsockopen - whe...

python post large files to django

I am trying to find the best way (most efficient way) to post large files from a python application to a Django server. If I rely on raw_post_data on the Django side then all the content needs to be in RAM before I can read it which doesn't seem efficient at all if the file received is 100s of megs. Is it better to use the file uploads...

Zend_framework - place data in $_POST when using _redirector helper in the controller

I an redirection (in some cases) from a controller to the error controller, action 'not-logged-in' using the redirector helper. My problem is the following: I want to pass an argument in the $_POST array (an URL from where the redirection happened) so the user will be able to return to that page after performing a login. How can i plac...

PHPUnit - test MVC controller with $_POST variable

I'm starting work with PHPUnit with Kohana. My application have many controllers which simply takes data from some form, validates and inserts/updates/deletes into/-/from database. How should I write a test cases for that. I know that if I want to test a function I write data provider function and just compare returned value with the ex...

How to programmatically distinguish element/control types from ASP.NET Request.Form key/value collection?

I have a simple ASP.NET web form as below: <form id="form1" runat="server"> <asp:TextBox ID="txt" runat="server"></asp:TextBox> <asp:DropDownList ID="ddl" runat="server"> <asp:ListItem Text="X" Value="X"></asp:ListItem> <asp:ListItem Text="Y" Value="Y"></asp:ListItem> <asp:ListItem Text="Z" Value="Z"></as...

open a new window with post values enhancements

var projectWindow; function btnNew_Click() { var form = document.createElement("form"); form.setAttribute("target", "projectWindow"); form.setAttribute("method", "post"); form.setAttribute("action", "MySite.aspx"); document.body.appendChild(form); var hiddenField = document.create...

Why form posting yields $_FILES['thefile']['name'][0] instead of $_FILES['thefile'][0]['name'] ?

When you name several file input fields with the same name and an array index like so: <input type='file' name='thefile[0]'> <input type='file' name='thefile[1]'> Then in the form submission you get this: $_FILES['thefile']['name'][0] $_FILES['thefile']['name'][1] And so on with the other fields. I find this annoying because it preve...

python fetching multiple pages using post and cookies

Hi. Got a test site that I'm fetching. The site uses the POST method, as well as cookies. (Not sure that the cookies are critical, but i'm inclined to think they are..) The app presents a page, with a "next button" to generate the subsequent pages. I've used LiveHttpHeaders/Firefof to determine what the post data should be in the query...

Invoking a http post URL from iphone using .net web service

Hi all, I need to call a url from my iphone when i tap on a button. The url is taking a value from the UITextField as argument, also it is using a POST method to invoke the webservice. how do i use the URL in my iphone. I had done the same with GET method. but for that i created a url string with the value from the textfield. it cant b...

VBA/Corel Draw: How to send binary and text file in HTTP POST request to server from VBA/VB6 script running from Corel Draw 12/X4?

I want to send Corel Draw .CDR drawing binary files and XML SVG files from the application to a server via HTTP POST. I have done some research and this existing post seems closest but doesn't work for my situation: http://stackoverflow.com/questions/158633/how-can-i-send-an-http-post-request-to-a-server-from-excel-using-vba I've added...

jquery $.post won't disable a form

$('#com_form').submit(function(){ var ele = $(this); $.post("includes/agenda_com.php", { texte : ele.find('textarea').val(), id : ele.find('#agenda_id').val(); }, function(data){ if(data=='foo') { alert("Erreur ! votre commentaire n'a p...

A simple PHP query

I am a noob to PHP just wondering why are we writing the php script in the body tag of HTML. I am just taking a word on one page and directing it to another page using the post method. below is the code. page1.html <form action="disp.php" method="post"> Enter a word: < input type="text" name="word" /> disp.php this goes inside th...

PHP Program help

Can any one please tell whats going on in this program? My one main doubt is about the 1st condition from where will we get the method for REQUEST_METHOD i mean the program is gng in the 1st if loop so REQUEST_METHOD == GET but where are we setting it. <html> <head><title>Temperature Conversion</title></head> <body> <?php if ($_SERVER[...

Probably obvious problem in JavaScript

Hi, I think this is just an obvious problem that I can't spot because I've been staring at code too long today. I have this callback as part of a JQuery POST: function(data){ if(data == 'yes') { $('div.done').show(); ...

create rss feeds page after posting a form in php

Hello, my question is the following How can I display a standard rss page after posting a form The problem I am having, is that it is not recognized as a feed if I use the forms action to get to the function that should echo out the rss/xml. If I use a direct link that is pointing to the function like controller/function I am getting ...

How to use MD5 in javascript to transmit a password

Hi, I have a jquery dialog modal box pop up for logging into my website. When a user clicks login it does a post request to a login.php file as follows: $.post( 'includes/login.php', { user: username, pass: password }, onLogin, 'json' ); How do I do an md5 on that password before putting it in the post req...