I have got an issue that has been working out me now for a few hrs.

I am using AJAX to update a div. The response div updates for any second then reverts to the original value. However, after i uncomment the alert in line 4 below, everything works perfectly and also the response div updates properly.

Here's my code:

<script type="text/javascript">
    jQuery(document).ready(function($) {
        $('#bidform-0').change(function(){      
            //alert('$bidvalue');
            var $bidvalue=$('#your-bid-0').val();
                jQuery.ajax({
                    url:"<?php bloginfo('wpurl'); ?>/wp-admin/admin-ajax.php",     
                    type:'POST',
                    data:{action:'my_special_ajax_call', bidvalue:$bidvalue },
                    async:false,
                    success:function(results)
                    {
                    //alert(results);
                    $("#rem-0").html(results);
                    }
                });
            }
        );
    });                               
</script>


<form id="bidform-0" name="bidform-0" action="">
Enter: <input type="text" name="your-bid-0" id="your-bid-0" /><input type="submit" value="Bid" /><input type="hidden" name="post-id" value="25" />

The PHP that will get known as:

function implement_ajax() {
if(isset($_POST['bidvalue']))
{
    $current_user = wp_get_current_user();
    $currentuser = $current_user->ID;
    $currentbids = get_user_meta( $currentuser, 'bids', true );
    $currentbids--;
    update_user_meta( $currentuser, 'bids', $currentbids );
    echo $currentbids;
    die();
    } // end if
}

You'll observe that I am using Wordpress 3.1...

Grateful for just about any ideas.


EDIT: Okay, here's my very own reaction to this. I had been testing on localhost. After I switched to my web server, my problems appeared to vanish.