Thanks for the tip. Unfortunately the code you sugessted is not picking out the right id either. Could this be due to the post returning html and not xml like I see in all of the examples of doing something like this? Can I specify a return type in the post call, or in the callback function?
The alert(html); line shows that the returned data begins with <html>.
Thanks for your help!
Julius
On 10/28/06, Jörn Zaefferer
<[EMAIL PROTECTED]> wrote:
Julius Lucks schrieb:
> The post is working meaning that if I uncomment the alert(html); line
> in the post function, I see the html form (as returned by the
> /save_record url) now populated with a brand new record_id which is
> not 0. However, the existing html form still has the record_id as 0,
> meaning that the line
>
> var new_record_id = $("input#record_id",html).val();
>
> seems to be accessing the current DOM, and not the returned html. Any
> hints as to why this may be the case?
Using selectors by id does ignore the given context. You could instead
try this:
var new_record_id = $("[EMAIL PROTECTED]", html).attr('value');
Hope that helps.
--
Jörn Zaefferer
http://bassistance.de
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/
--
-----------------------------------------------------
http://openwetware.org/wiki/User:Lucks
-----------------------------------------------------
_______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/
