$.post('/ur.l'
, jQuery('selectors').serialize()
+ '&textareaname=" + escape( $("#textarea").val() )
, function(data) { ... }
}
);
$.post('/ur.l'
, {'foo':'bar', 'foobar','qazbar'}
, function(data) { ... }
);
Problems
-
Is it possible to combine the object into
{...}the jQuery serialization? -
jQuery doesn’t seem to serialize textareas, is there a better method than the above?
I’ve tried and see that the textarea is in the jQuery object, but the text is blank:jQuery('input, textarea').serialize()
jQuery.param will serialize an object into a url encoded string. You can then combine them together.
serializedoes works with textareas. Make sure you have a valid name on the textarea, and that it is not disabled.