How is this supposed to be written so that it would actually work?
saveBuyerInfo(
{ 'save_'+$("#textAreaXMLPostRequest").attr('name') :
$("#textAreaXMLPostRequest").val() } );
How is this supposed to be written so that it would actually work?
saveBuyerInfo(
{ 'save_'+$("#textAreaXMLPostRequest").attr('name') :
$("#textAreaXMLPostRequest").val() } );
You can't have an expression as the key in an object literal. Instead, create your object first:
var save = {};
save['save_' + $("#textAreaXMLPostRequest").attr('name')] = $("#textAreaXMLPostRequest").val();
saveBuyerInfo(save);