Search Results

Search found 34595 results on 1384 pages for 'form post'.

Page 9/1384 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • ASP.net post and default page.

    - by diamandiev
    Scenario: I have a regular aspx page with a form. When someone clicks a button the form submitted via post like normal. HOWEVER. The page where the form resides is the default page(Default.aspx). So when someone goes to the site: http://site.com/ and submits the forms he gets redirected to http://site.com/default.aspx. I tried setting the action of the form to http://site.com/. However asp.net does not allow to use root urls with a POST. So is there any workaround? Ajax is not an option.

    Read the article

  • Struts and logging HTTP POST request body

    - by Ivan Vrtaric
    I'm trying to log the raw body of HTTP POST requests in our application based on Struts, running on Tomcat 6. I've found one previous post on SO that was somewhat helpful, but the accepted solution doesn't work properly in my case. The problem is, I want to log the POST body only in certain cases, and let Struts parse the parameters from the body after logging. Currently, in the Filter I wrote I can read and log the body from the HttpServletRequestWrapper object, but after that Struts can't find any parameters to parse, so the DispatchAction call (which depends on one of the parameters from the request) fails. I did some digging through Struts and Tomcat source code, and found that it doesn't matter if I store the POST body into a byte array, and expose a Stream and a Reader based on that array; when the parameters need to get parsed, Tomcat's Request object accesses its internal InputStream, which has already been read by that time. Does anyone have an idea how to implement this kind of logging correctly?

    Read the article

  • Receiving POST data in ASP.NET

    - by grast
    Hi, I want to use ASP for code generation in a C# desktop application. To achieve this, I set up a simple host (derived from System.MarshalByRefObject) that processes a System.Web.Hosting.SimpleWorkerRequest via HttpRuntime.ProcessRequest. This processes the ASPX script specified by the incoming request (using System.Net.HttpListener to wait for requests). The client-part is represented by a System.ComponentModel.BackgroundWorker that builds the System.Net.HttpWebRequest and receives the response from the server. A simplified version of my client-part-code looks like this: private void SendRequest(object sender, DoWorkEventArgs e) { // create request with GET parameter var uri = "http://localhost:9876/test.aspx?getTest=321"; var request = (HttpWebRequest)WebRequest.Create(uri); // append POST parameter request.Method = "POST"; request.ContentType = "application/x-www-form-urlencoded"; var postData = Encoding.Default.GetBytes("postTest=654"); var postDataStream = request.GetRequestStream(); postDataStream.Write(postData, 0, postData.Length); // send request, wait for response and store/print content using (var response = (HttpWebResponse)request.GetResponse()) { using (var reader = new StreamReader(response.GetResponseStream(), Encoding.UTF8)) { _processsedContent = reader.ReadToEnd(); Debug.Print(_processsedContent); } } } My server-part-code looks like this (without exception-handling etc.): public void ProcessRequests() { // HttpListener at http://localhost:9876/ var listener = SetupListener(); // SimpleHost created by ApplicationHost.CreateApplicationHost var host = SetupHost(); while (_running) { var context = listener.GetContext(); using (var writer = new StreamWriter(context.Response.OutputStream)) { // process ASP script and send response back to client host.ProcessRequest(GetPage(context), GetQuery(context), writer); } context.Response.Close(); } } So far all this works fine as long as I just use GET parameters. But when it comes to receiving POST data in my ASPX script I run into trouble. For testing I use the following script: // GET parameters are working: var getTest = Request.QueryString["getTest"]; Response.Write("getTest: " + getTest); // prints "getTest: 321" // don't know how to access POST parameters: var postTest1 = Request.Form["postTest"]; // Request.Form is empty?! Response.Write("postTest1: " + postTest1); // so this prints "postTest1: " var postTest2 = Request.Params["postTest"]; // Request.Params is empty?! Response.Write("postTest2: " + postTest2); // so this prints "postTest2: " It seems that the System.Web.HttpRequest object I'm dealing with in ASP does not contain any information about my POST parameter "postTest". I inspected it in debug mode and none of the members did contain neither the parameter-name "postTest" nor the parameter-value "654". I also tried the BinaryRead method of Request, but unfortunately it is empty. This corresponds to Request.InputStream==null and Request.ContentLength==0. And to make things really confusing the Request.HttpMethod member is set to "GET"?! To isolate the problem I tested the code by using a PHP script instead of the ASPX script. This is very simple: print_r($_GET); // prints all GET variables print_r($_POST); // prints all POST variables And the result is: Array ( [getTest] = 321 ) Array ( [postTest] = 654 ) So with the PHP script it works, I can access the POST data. Why does the ASPX script don't? What am I doing wrong? Is there a special accessor or method in the Response object? Can anyone give a hint or even know how to solve this? Thanks in advance.

    Read the article

  • HTTP POST prarameters order / REST urls

    - by pq
    Let's say that I'm uploading a large file via a POST HTTP request. Let's also say that I have another parameter (other than the file) that names the resource which the file is updating. The resource cannot be not part of the URL the way you can do it with REST (e.g. foo.com/bar/123). Let's say this is due to a combination of technical and political reasons. The server needs to ignore the file if the resource name is invalid or, say, the IP address and/or the logged in user are not authorized to update the resource. Looks like, if this POST came from an HTML form that contains the resource name first and file field second, for most (all?) browsers, this order is preserved in the POST request. But it would be naive to fully rely on that, no? In other words the order of HTTP parameters is insignificant and a client is free to construct the POST in any order. Isn't that true? Which means that, at least in theory, the server may end up storing the whole large file before it can deny the request. It seems to me that this is a clear case where RESTful urls have an advantage, since you don't have to look at the POST content to perform certain authorization/error checking on the request. Do you agree? What are your thoughts, experiences?

    Read the article

  • Post microphone input from Flash to server

    - by Seb
    We're trying to get microphone input in a Flash movie and the post it to the server so it can be saved in a file. Currently, we're using PHP in the server, but I guess the key thing here is: How to post the audio to the server? After a post is made, then I guess it'd be a matter of handling the encoding and saving to a file, which can be done with pretty much any server-side language. Any idea if this is at all possible?

    Read the article

  • How to post Arabic characters in PHP

    - by Peter Stuart
    Okay, So I am writing an OpenCart extension that must allow Arabic characters when posting data. Whenever I post ????? the print_r($_POST) returns with this: u0645u0631u062du0628u0627 I check the HTML header and it has this: <meta charset="UTF-8" /> I checked the PHP file that triggers all SQL queries and it has this code: mysql_query("SET NAMES 'utf8'", $this->link); mysql_query("SET CHARACTER SET utf8", $this->link); mysql_query("SET CHARACTER_SET_CONNECTION=utf8", $this->link); This is in my form tag: <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="form" accept-charset="utf-8"> I can't think of what else I am doing wrong. The rest of the OpenCart framework supports UTF8 and arabic characters. It is just in this instance where I can't post anything arabic? Could someone please help me? Many Thanks Peter

    Read the article

  • Writing a post search algorithm.

    - by MdaG
    I'm trying to write a free text search algorithm for finding specific posts on a wall (similar kind of wall as Facebook uses). A user is suppose to be able to write some words in a search field and get hits on posts that contain the words; with the best match on top and then other posts in decreasing order according to match score. I'm using the edit distance (Levenshtein) "e(x, y) = e" to calculate the score for each post when compared to the query word "x" and post word "y" according to: score(x, y) = 2^(2 - e)(1 - min(e, |x|) / |x|) Each word in a post contributes to the total score for that specific post. This approach seems to work well when the posts are of roughly the same size, but sometime certain large posts manages to rack up score solely on having a lot of words in them while in practice not being relevant to the query. Am I approaching this problem in the wrong way or is there some way to normalize the score that I haven't thought of?

    Read the article

  • Doing a POST to a Service Operation in ADO.NET data services

    - by DataServices123
    Is it possible to POST to a service operation defined in an ADO.NET data service (it is decorated with WebInvoke)? I had no problem calling the service operation as an HTTP GET. However, when I switched to doing a POST, the stack trace consistently comes back with "Parameter cannot be NULL". I am using the jQuery syntax below, and sending the POST as JSON (though I'm not including the $.ajax call, the parameter names line up exactly). It would be possible to try this with WCF, as opposed to ADO.NET data services (newly renamed as WCF data services). However, my preference would be to use this approach first. I have tried this with and without the stringify method. Most examples online only show how to use a POST to entities (i.e. for handling CRUD operations). However, in this case we are POSTing to a Service Operation. function PostToDataService() { varType = "POST"; varUrl = "http://dev-server/MyServices/MyService.svc/SampleSO"; varData = { CustomMessage: $("#TextBox1").val() }; varData = JSON.stringify(varData); varContentType = "application/json; charset=utf-8"; varDataType = "json"; varProcessData = true; CallService(); }

    Read the article

  • HTTPS post - what I'm doing wrong?

    - by evilone
    Hi, I'm making requests to the webaddress to get XML files throught the HTTPS connection. But this connection works like 50%. In most cases it fails. Usual error is "socket error #10060". Or "Error connecting with SSL. EOF was observed that violates the protocol". What I'm doing wrong? function SendRequest(parameters: string): IXMLDocument; var sPostData: TStringList; sHttpSocket: TIdHTTP; sshSocketHandler: TIdSSLIOHandlerSocketOpenSSL; resStream: TStringStream; xDoc: IXMLDocument; begin sPostData := TStringList.Create; try sPostData.Add('add some parameter to post' + '&'); sPostData.Add('add some parameter to post' + '&'); sPostData.Add('add some parameter to post' + '&'); sPostData.Add(parameters); sHttpSocket := TIdHTTP.Create; sshSocketHandler := TIdSSLIOHandlerSocketOpenSSL.Create; sHttpSocket.IOHandler := sshSocketHandler; sHttpSocket.Request.ContentType := 'application/x-www-form-urlencoded'; sHttpSocket.Request.Method := 'POST'; resStream := TStringStream.Create; sHttpSocket.Post(Self.sUrl, sPostData, resStream); xDoc := CreateXMLDoc; xDoc.LoadFromStream(resStream); Result := xDoc; resStream.Free; sHttpSocket.Free; sshSocketHandler.Free; sPostData.Free; except on E: Exception do begin TCommon.ErrorLog('errorLog.txt', DateTimeToStr(Now) + ' ' + E.Message); end end; end; Maybe I can do this in another way, that works like 100%, when internet connection is available? Regards, evilone

    Read the article

  • The post->success->data variable is empty..

    - by Asaf
    Hello, I tried sending some data like so: <form action="http://www.someurl.com/something.php" id="login"> <input type="textbox" id="UserName" value="user"> <input type="textbox" id="Password" value="password"> <input type="submit" value="submit"> </form> <div id="result"></div> <script type="text/javascript"> $('form#login').submit(function() { $.post($('form#login').attr('action'), $('form#login').serialize(), function(data) { $('#result').html(data+'222') }); return false; }); </script> Now, the value of #result div change to 222... that is: the post was successful but for some reason there is no data, and when I go directly to something.php and post manually, it does bring back data (am I mistaken or does the post(success(data)) variable returns the whole page returned after you post something? if so, how could it be?) Thank you very much for your help

    Read the article

  • Html POST and return the same form with the values

    - by vtortola
    Hi, I'm learning web development, and I don't know how do this simple thing. I've a html form with "text", "radio" and "checkbox" controls, that POST the values to the server and it saves them, for example in a file. I save the POST in raw format: key=value&key=value&key=value&key=value and I'd like that when the user open the form back, return the form with the saved values already in the controls. Is there any neat way to do this? Or should I parse the POST string and set the values one by one in the controls at the server level? I think, I could return the saved data in a hidden input control, and after with a javascript I could do a getElementById(key) and set the value to each input control... but do I need to put the post string in a special format? How would you do it? Thank you in advance.

    Read the article

  • Silverlight caching HTTP POST which results in a 404

    - by Steav
    Situation: I am developing a Silverlight-Application which needs Component based on a local HTTP Listener. The HTTP-Listener can't be 'required' to be installed and running when the Application starts, so the Application does the following: Handshake via HTTP POST If Connection failed open a Click-Once Setup to install the component. So far so good.... now the Problem is: If the HTTP POST for the Handshake fails, because the Listener is not running the POST is cached.... and the following Connection Attempts after the Service is running fail, because the HTTP POST is still in Cache after the first try. NOTE: This is NOT a policy-problem. I'm using SL4 PS: I allready tried adding a random parameter to the URL like First try: Second try: didn't work :-(

    Read the article

  • jquery/ajax post() in a posted page

    - by haltman
    hi everybody, I have a page with a div, inside this div I load a page with a form with a select, I can get selected option by post() function but, how can I get at the same time selected option and full data option? I've tried to get full data with a post() in a click() function positioned directly on form page but it does not work, can I post 2 times on the same page(one for get selected option and one for full data option)? thanks in advance ciao, h.

    Read the article

  • Weblogic server: Why response sent prior to post completion

    - by markn
    When analyzing traffic with a packet sniffer, we are seeing an http response from a weblogic server prior to the completion of the http post to that server. In this case, the jsp page on the server is basically a static page, no logic to do anything with the contents of the post at this time. But why would the server send the response prior to completion of the post? I found Weblogic documentation about how to configure the server to ignore a denial-of-service attack using Http post. Maybe that is what is happening? No one I know has seen this behaviour before. Maybe some weblogic-savvy person will know what is going on. Thanks

    Read the article

  • POST method getting converted to GET in IE-9

    - by Sri127
    I have this line of code in my JSP. (I'm using struts 1.3) <html:form action="screening/mine.do" method="post"> . . . </html:form When the action corresponding to mine.do is invoked (using struts-config.xml), the page is getting submitted as GET instead of POST. All the request parameters including the required ones are getting lost due to this. This issue occcurs only in IE-9. The response remains as POST when I use other versions of IE or any other browsers. How do I make the response to remain as POST in IE-9 ? EDIT : I observed one more issue in this. Whenever the page is rendered in a new window, this issue occurs. Other places, the POST works fine in IE-9. Also, this issue occurs in Win7/IE-8, but works absolutely fine in XP/IE-8. Is there something to do with the OS as well??? Any solutions would be useful. Thanks!!

    Read the article

  • Post JSON array to mvc controller

    - by Yustme
    I'm trying to post a JSON array to a mvc controller. But no matter what i try, everything is 0 or null. I have this table that contains textboxes. I need from all those textboxes it's ID and value as an object. This is my java code: $(document).ready(function () { $('#submitTest').click(function (e) { var $form = $('form'); var trans = new Array(); var parameters = { TransIDs: $("#TransID").val(), ItemIDs: $("#ItemID").val(), TypeIDs: $("#TypeID").val(), }; trans.push(parameters); if ($form.valid()) { $.ajax( { url: $form.attr('action'), type: $form.attr('method'), data: JSON.stringify(parameters), dataType: "json", contentType: "application/json; charset=utf-8", success: function (result) { $('#result').text(result.redirectTo) if (result.Success == true) { return fase; } else { $('#Error').html(result.Html); } }, error: function (request) { alert(request.statusText) } }); } e.preventDefault(); return false; }); }); This is my view code: <table> <tr> <th>trans</th> <th>Item</th> <th>Type</th> </tr> @foreach (var t in Model.Types.ToList()) { { <tr> <td> <input type="hidden" value="@t.TransID" id="TransID" /> <input type="hidden" value="@t.ItemID" id="ItemID" /> <input type="hidden" value="@t.TypeID" id="TypeID" /> </td> </tr> } } </table> This is the controller im trying to receive the data to: [HttpPost] public ActionResult Update(CustomTypeModel ctm) { return RedirectToAction("Index"); } What am i doing wrong?

    Read the article

  • Zend and Jquery (Ajax Post)

    - by Zend_Newbie_Dev
    I'm using zend framework, i would like to get POST data using Jquery ajax post on a to save without refreshing the page. //submit.js $(function() { $('#buttonSaveDetails').click(function (){ var details = $('textarea#details').val(); var id = $('#task_id').val(); $.ajax({ type: 'POST', url: 'http://localhost/myproject/public/module/save', async: false, data: 'id=' + id + '&details=' + details, success: function(responseText) { //alert(responseText) console.log(responseText); } }); }); }); On my controller, I just don't know how to retrieve the POST data from ajax. public function saveAction() { $data = $this->_request->getPost(); echo $id = $data['id']; echo $details = $data['details']; //this wont work; } Thanks in advance.

    Read the article

  • Jquery $.post() - Possible to do a full page post request?

    - by Sosh
    I know I can do an out of band Post request with Jquery and the $.post( syntax. However, I'm interested to know if it is possible for jquery to cause a post request on the whole page (as when a form is submitted) so that a brand new page is loaded. Is this possible? Thanks There is no form element in the DOM, so I can't do form.submit().

    Read the article

  • Server Unable to Capture the POST Data sent from another server by Redirecting the URL

    - by user1749092
    Recently i started working on the Payment Gateway( further spelled as 'PG') process for my site. And for the process we have to send the Post data by form to PG server by redirecting to there page and by response from the PG about the Transaction they are sending POST data by redirecting the URL to our server page, the problem arises here, as my server unable to retrieve the POST Data sent from PG server. As i am coding in PHP, i tried to print all the response coming from PG by print_r($_POST); and even tried with print_r($_REQUEST);. I didn't found any data printing except the PHPSESSID and some other data array. As for the confirmation I checked wether they sending the Data or not by the IE addon as "TamperIE" where it is showing the all the POST Data sending from there server. But it is not at all coming to our server. And I tried this process on some other Server, there i able to get the POST response but not with currently working server. So please can you suggest me what might be the problem. Thanks!

    Read the article

  • Submit POST form from url

    - by Martijn Van Mierloo
    Website: www.example.com <form method="POSt" action="" > <input type="hidden" name="test1" value="test11" /> <input type="hidden" name="test2" value="" /> <input type="hidden" name="test3" value="test33" /> <input type="submit" value="Submit"> </form> I want to sumbit this form with adding the correct parameters in the URL. With GET, I can simply use : http://ww.example.com/?test1=test11&test2=&test3=test33 and the form will be sumbitted. Can I do the same for a POST? If so, how? Thanks

    Read the article

  • form validation without reset

    - by Paulo Bueno
    Hi guys Is there a way to check the data sent by a form to a PHP page return to the form page WITHOUT resetting the data sent and show a error? The form has 20 fields and I need to check one of them on a bd. If it fails the user may be redirected to the form page with the form populated and displaying a error message on the field which is 'wrong'. I would like any advice of a technique instead of populating each field using PHP.

    Read the article

  • Form POST or sessions?

    - by eddienotizzard
    If you have an item where you allow users to add comments, how can you pass which item the user is replying too? I've though of using a hidden field in a form, however this can be easily changed using plugins such as firebug: <form method="post" action="blah"> <input type="hidden" name="item_id" value="<?php echo $item_id; ?>"> <!-- other form data here --> <input type="submit" name="submit"> </form> Or just simply using a session: $_SESSION['item_id'] = $item_id Is there a safe way to send the item data in a form?

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >