Once a form is submitted, I'd like to get the value of a field called 'featuredOneImage', and apply that the CSS background of a div.
So once the 'Save' button is pressed, here's the jQuery to submit the ajax needed (which saves the values to a db)
$("form#featuredItems").submit(function() {
// we want to store the values from the form input box, then send via ajax below
var $form = $(this);
$.ajax({
type: "POST",
url: "ajax/featuredItems.php",
data: $form.serialize(),
success: function(){
showAction('Featured Items Saved');
}
}); // End .ajax function
return false;
}); //End submit function()
So, inside the success function, I'd put something like "get value of 'featuredOneImage' and set the background equal to that value for the div with id 'featuredOneBox'"
I just wasn't sure how to tell the jQuery which field to get the value from.