update_post_meta using ajax

You didn’t set a name attribute in your input tag with the id = “amount”. Set the name as “inpAmount” and try again.

<input id="amount" class="inpAmount" type="text" maxlength="15" />

should be

<input id="amount" class="inpAmount" type="text" maxlength="15" name="inpAmount" />

As previously mentioned, the path to admin-ajax.php looks wrong as well.

The wp_ajax nomenclature is also incorrect. The actions suffix needs to match the value of the input with the name attribute set to “action.”

Should be:

add_action('wp_ajax_updateAmountOffered', 'updateAmountOffered');
add_action('wp_ajax_nopriv_updateAmountOffered', 'updateAmountOffered');