$.post takes a request string (separated by "&"), or a json for parameters
to be passed to the server. you won't be able to form a form element. if you
want to go thru the pain of finding all the form elements and their values,
then i would recommend looking into ajax form plugin.
http://www.malsup.com/jquery/form/
or, if you are willing to do the hardwor, then you can collect all the form
fields into a json object, or concat them into string form with "&" and
provide this string as param to the $.post function.
-GTG
On 6/26/07, vince <[EMAIL PROTECTED]> wrote:
Another problem I am having.
I have tried using jQuery's $.post function from within a form. i.e:
onclick="$.post(\'login.php\', this.form ,function(data)
{ document.getElementById(\'login_container\').innerHTML = data; }) ;
which ... kind of works
on the other end I have:
if (isset($_POST['usern'])) {
$usern = $_POST['usern'];
$pass = $_POST['pass'];
Simple. However it doesn't work, and if I echo the contents of the
strings I get...
[object HTMLInputElement]
Any help?
Thanks