Thanks Blair. That was it.
_____ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Blair McKenzie Sent: Thursday, January 04, 2007 7:54 PM To: jQuery Discussion. Subject: Re: [jQuery] Passing formfield value on blur First, inside an event you can access the element through 'this': i.e. inside the blur function $('#idm') == $(this) I don't understand this: var formval = {$('#idm').val();}; If you're trying to create an object then you should use: var formval = { idm:$(this) .val() }; If you're trying to create an array: var formval = [ $(this).val() ]; Blair On 1/5/07, Michael E. Carluen <[EMAIL PROTECTED]> wrote: Oops the script is: $("#idm").blur( function() { var formval = {$('#idm').val();}; $.ajax({ type: "POST", url: "testj.php", dataType: "json", data: formval, success: function(response){$('#formname).append(response.company_name); } }); }); _____ From: [EMAIL PROTECTED] [mailto: <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED] On Behalf Of Michael E. Carluen Sent: Thursday, January 04, 2007 7:22 PM To: 'jQuery Discussion.' Subject: [jQuery] Passing formfield value on blur Hello folks. I'm trying to pull some data after a blur event from a form field (id=idm). Unfortunately, the script below is not working. Any suggestions will be appreciated. Thanks in advance! $("#idm").blur( function() { var params = {$('#idm').val();}; $.ajax({ type: "POST", url: "testj.php", dataType: "json", data: formval, success: function(response){$('#formname).append(response.company_name); } }); }); _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
_______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/