Easy solution. I am using the behaviour.js package. Using this, the solution
was to apply a Behaviour.apply(); command when the XMLHttpRequest() is
complete. So my solution was to use the form_remote_tag properties to help
me call this like such:
link_to_remote("questions",
:url => { :action => ''curator_questions'',
:uid => curator.id,
:tid => @curators.id },
:update => "curator_question_container",
:complete => "Behaviour.apply();")
Steve
http://www.smarkets.net
On 4/2/06, Steve Odom <steve.odom@gmail.com>
wrote:>
> Hi list,
>
> Say I''ve got a page that lists the students names and grades.
Grades are
> clickable using a form_remote_tag that then renders a new partial on the
> right hand side of the page that then lists the individual test scores for
> the particularly student. So far so good.
>
> And lets say in the newly rendered right-hand section, I have another
> form_remote_tag that will allow me to input a new grade for that student.
> I''d like to set an onfocus event for that text input field that
> element.shows another div (that displays a help message, lets say).
>
> The problem I am having is that I can''t get the onfocus event to
work
> because -- since the field is contained in a newly rendered div that
wasn''t
> present when the page first loaded -- its id doesn''t seem to be
found in the
> dom and so the onfocus won''t trigger.
>
> Is there a javascript command that can be used to refresh the dom when a
> partial is rendered?
>
> Thanks,
>
> Steve Odom
> http://www.smarkets.net
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://wrath.rubyonrails.org/pipermail/rails/attachments/20060402/95d1b762/attachment.html