serialization - $(this).serialize() -- How to add a value? -
currently have following:
$.ajax({ type: 'post', url: this.action, data: $(this).serialize(), });
this works fine, add value data, tried
$.ajax({ type: 'post', url: this.action, data: $(this).serialize() + '&=nonformvalue' + nonformvalue, });
but didn't post correctly. ideas on how can add item serialize string? global page variable isn't form specific.
instead of
data: $(this).serialize() + '&=nonformvalue' + nonformvalue,
you want
data: $(this).serialize() + '&nonformvalue=' + nonformvalue,
you should careful url-encode value of nonformvalue
if might contain special characters.
Comments
Post a Comment