Passing more than 1 form field
Posted
by cf_PhillipSenn
on Stack Overflow
See other posts from Stack Overflow
or by cf_PhillipSenn
Published on 2010-03-30T02:45:49Z
Indexed on
2010/03/30
2:53 UTC
Read the original article
Hit count: 420
jQuery
|coldfusion
I'm trying to update the LastName field for PersonID. I can pass PersonID, but I don't know the syntax for also passing the LastName field.
$('input[name="LastName"]').live('focusout', function() {
var PersonID = $(this).parents("tr").attr("ID");
var LastName = $(this).val(); // todo: serialize
$.ajax({
url:'Remote/Person.cfc?method=UpdateLastName&returnformat=json'
,data:'PersonID='+PersonID
});
$(this).parents("td").empty().append(LastName);
});
Q: Is is something like data:{'PersonID='+PersonID,'LastName='+LastName}
Am I missing a squiggly line or a parenthesis or comma or dot or colon or semi-colon or something?
© Stack Overflow or respective owner