Hi Jörn,

Just to be extra clear, I am using jquery to overide an existing rails action (/save_record).  The action is returning the html and is what is used to generate the first instance of the html that is being displayed.  So the html that the $.post is recieving is the full shebang - I am not sure if the headers, _javascript_s, whatnot would get in the way of parsing it correctly.

Cheers,

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/

Reply via email to