Re: Javascript with select in partial

RVince
Wed, 02 Sep 2009 00:51:48 -0000

Hassan,

I got it!!! Thanks for your patience and perisistence -- I never would
have gotten it if not for you.
In my controller, I was replacing the partial with the partial, when I
should have been replacing the div with the partial as in:

div.replace ''notesdiv'' , :partial =>
''channelnotesfield''

Yes, I always use firebug, but how could I have used it to have
debugged this? -RVince

On Sep 1, 6:10 pm, Hassan Schroeder
<hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:
> On Tue, Sep 1, 2009 at 3:42 AM,
RVince<rvinc...-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> wrote:
> > And that does seem to invoke things. However, when I do it your way
> > not, on subsequent calls to replace channelnotesfield in my
> > controller, I get a dialog box that says:
>
> > RJS Error:
>
> > TypeError: element is null
>
> One more time: do you have Firebug installed? If not, do so. Right
> now. It will help debug JS-related errors and much more.
>
> It sounds to me like you''ver removed an element with an ID your JS
> is looking for. But it will be easy enough to tell with a tool like
Firebug.
>
> Really. :-)
>
> --
> Hassan Schroeder ------------------------
hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
> twitter: @hassan