I know how to get an AJAX response:
$.post( '/action',
{ actiontodo: 'insert' }
function (data) { alert(data); } );
Int the action.php (server side):
<?php
if ($_POST['actiontodo'] == 'insert')
{
doInsertAction();
echo "inserted";
}
?>
Finally the output of this cod...
Hi,
I'm trying to do an HTTP Post using Javascript.
I'm using the code reported here:
http://stackoverflow.com/questions/133925/javascript-post-request-like-a-form-submit
and it works fine.
But I need to remain in the same page while the HTTP Post is sent.
How can I do?
Thx
...
Hi!
As always I have searched the forums and googled my self slightly insane without being able to figure out what I am doing wrong. Therefore I turn to the great minds frequenting this site in hopes to find an answer.
I'm building an application that will communicate with a database and in doing so I'm trying to learn how to use JSON t...
Anyone knows this library? I'd like to know how if (and how) I can use it to send one or more images on my friendfeed account - the documentation basically says nothing.
thank you.
...
Hi There,
I am creating a multi-step form, and I am struggling to pass around the ID's to each step of the form, below is my code
function add_career() {
$data = array();
$this->load->model('admin_model');
$this->load->library('form_validation');
if($this->input->post('career_set') == 'Save') {
$t...
I know a SESSION can expire but what about $_REQUEST/$_POST/$_GET variables?
My question is, I have users that submit information and I need to set a Id for that information before I insert it into a database. Now I thought about using a SESSION but the problem is if the session expires before the user has submitted the information to...
If I leave the action attribute out of my form so it posts back to the same JSP I have no trouble reading the request parameters. However when I add an action attribute to handle the form with a separate JSP, the request parameters are null. Here's a short example (FormTest.jsp) that illustrates how I'm reading the request.
<HTML>
...
In my ASP.Net MVC 2 application I am using a Json object to submit form data. I would like to take expert advice whether it is a safe and good practice to do it or not and why? Please note, this question is not about how to do it but rather about best practice. Appreciate your valuable suggestions.
...
I've looked at some of the apple core API stuff, as well as ASIHTTPRequest. It's made me curious - is there a simple way to just send a nonblocking request to a URL? I could do it what seems to be the standard way - make the request object, make a useless delegate object that just ignores the response, and that's how I've been doing it. ...
I'm not sure if I'm asking the right question.
We have a web app that we're trying to have a 3rd party POST to. We're creating a special landing page for them to which they can submit the data we need via POST.
I'm not sure how to respond to their request, which I assume I handle as an incoming HttpRequest. Do I process their data ...
Hello All.
I am trying to create a REST web service using JAX-RS. In that, I have PUT method or POST method which consumes the json as mediatype in the REST web service. Can I know how to call these methods from the client side. How do we pass that json as input from client side to those PUT and POST method and how would we consume the...
Hi,
I am using this code in my form to create a drop down menu. (the list of options loads corrects from my sql database). Once the user hits submit, I should be able to retrieve the value selected with $_POST['field'].
<form action="page2.php" method="post" name="form" id="form">
<?php
$query = sprintf("SELECT domaine FROM `domaine...
Hello,
I've queried this forum for hours looking for an idea/answer/solution for my problem, but came up empty every time.
i have created a SynchronousRequest using the following:
NSMutableURLRequest *theRequest = [[NSMutableURLRequest alloc] initWithURL:url];
NSString *msgLength = [NSString stringWithFormat:@"%d", [params len...
I want to set a default class for all images in a single post eg. they have a red border. How do i do that? Something like on http://net.tutsplus.com
...
I am having trouble getting the VBscript on a .asp page to assign values to variables which are sent by the jQuery ajax() function.
I have this code on several other sites and it works fine, but for some reason it won't work on this website.
Just in case it makes a difference we are running the sites through IIS7.
The issue is that th...
Here's the big picture. We're running a server in IIS 6 that hosts several web sites and applications, and we're in the process of moving the whole thing to a different data center with a slightly different setup. We've notified our users and updated our DNS info so that theoretically everyone will be happily hitting the new server fro...
I am responding to a POST from a server that I don't control, and all the params[] come in as Tempfiles - which I can work around. (I am running on thin here at my desktop mac).
The whole method works, but at the last line I have:
render :nothing => true
As there is nothing to render. It is in this render :nothing => true call that rai...
So, somewhat standard situation:
OK, so replacing <div> with <form> works. Now to see if any nesting issues occur...
<div id=hidden>
<input type=hidden value=2 id=i1 name=i1>
<input type=hidden value=5 id=i2 name=i2>
<input type=hidden value=6 id=i3 name=i3>
<input type=hidden value=1 id=i4 name=i4>
<input type...
I am having some trouble sending values from one page to another using the jQuery ajax() function.
For some reason the request.form on my VBscript page won't pick up the data I send using the ajax() function in jQuery.
Here is my javascript function which is called in an onsubmit event in my form:
function sendData() {
$.ajax({
typ...
Hello,
I am currently working on rails3 application that uses jQuery. I have a javascript plugin that returns an array of JSON data based on selections that the user has made. I have a save button that reads this array of data form the java script plug in and posts it back to the rails application to be saved. The javascript seems to be ...