[jQuery] Re: post data and get data in one request?

2007-09-21 Thread Jake McGraw

Ah, I think you can do something like:


  
  
  


and then in "myapp.php":



The trick is manually inserting the GET variables as URL parameters in
the form action field.

- jake

On 9/20/07, Codex <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> this is probably something very simple, but I don't get it. I want to
> post data to a php file that send the posted data to the DB. Then I
> would like to return the last inserted ID and use that on the same
> page the request was made from. How is this done? I know how to post
> and how to get, but not in the same request. Do I have to use Ajax?
>
> Maybe it's a little clearer if I mention it's for writing tags to the
> DB Flickr style.
>
> Need help! ;-)
>
>


[jQuery] Re: post data and get data in one request?

2007-09-21 Thread Josh Nathanson


Yup, you'll have to use ajax if you don't want to refresh the current page.

You'll probably want to use the Forms plugin to submit the form, then in 
your php somewhere, output the last inserted ID as the server response. 
Then you can use that new ID however you like as part of the callback 
function from the post.


-- Josh

- Original Message - 
From: "Codex" <[EMAIL PROTECTED]>

To: "jQuery (English)" 
Sent: Thursday, September 20, 2007 4:30 PM
Subject: [jQuery] post data and get data in one request?




Hello,

this is probably something very simple, but I don't get it. I want to
post data to a php file that send the posted data to the DB. Then I
would like to return the last inserted ID and use that on the same
page the request was made from. How is this done? I know how to post
and how to get, but not in the same request. Do I have to use Ajax?

Maybe it's a little clearer if I mention it's for writing tags to the
DB Flickr style.

Need help! ;-)