Thanks, that worked. One last question... how do I grab a hidden input value?
("#placebid").click(function() { $.ajax ({ type: "POST", data: { mybid: $('#mybid').val() listingid: $('#listingid').val() }, url: "ajax/place_bid.php", success: function(msg) { $ ("#bidform").find("#msg").not(".alert").append(msg) } }); }); is the above correct for multiable data values? On Jun 7, 10:04 am, "Mike Alsup" <[EMAIL PROTECTED]> wrote: > It looks like you're not actually using a form element so you need to > handle the data manually. Try adding a data property like this: > > $("#placebid").click(function() { > $.ajax ({ > type: "POST", > data: { mybid: $('#mybid').val() }, > url: "ajax/place_bid.php", > success: function(msg) { > $("#bidform").find("#msg").not(".alert").append(msg) > } > }); > > }); > > You should then be able to extract the bid from your $_POST var on the server. > > Mike > > On 6/7/07, Ken Iovino <[EMAIL PROTECTED]> wrote: > > > > > I'm in the middle of creating a bidding system with the help of > > jQuery. I'd like the actual bid process to be all Ajax. I have one > > input field for the price and a submit button to send it. Problem is I > > don't know how to send the users value from the input field to the php > > file. > > > I'm trying to get these basics functions down so I don't have to > > bother anyone else :p. > > > 1 - User adds a price and clicks submit. > > 2 - if there is a error message, show it and when the user resubmits, > > delete the old error message and show the new message. > > > Here is the basic code I'm using. I deleted alot of code surrounding > > it to keep it simple. > > > $("#placebid").click(function() { > > $.ajax ({ > > type: "POST", > > url: "ajax/place_bid.php", > > success: function(msg) { > > $("#bidform").find("#msg").not(".alert").append(msg) > > } > > }); > > > }); > > > <div class="bidform" id="bidform"> > > <div class="msg" id="msg"></div> > > Your Bid: <span class="green"><strong>$</strong></span> <input > > type="text" name="mybid" id="mybid" class="inputbutton" value="" > > size="10" /> <input type="submit" class="inputbutton" id="placebid" > > value="Place Bid" tabindex="1" title="" /> > > </div> > > > Can anyone send me in the right direction? I'm pretty good at PHP > > coding, but I'm a newbie when it comes to jQuery. Thanks in advanced!