Re: field update not happneing

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: field update not happneing

Mark Reginald James
Parker Thompson wrote:

> function flash(msg){
>   $('flash_msg').value = msg;
>   alert(msg);  // for debugging
>
> When I hit 'Add' the correct div is updated, I see the alert (saying
> "passed message"), and 'add_field' is cleared, but 'flash_msg' never
> gets set.  There are no js errors and I'm just totally stumped over why
> this could be.

What kind of HTML element has the flash_msg id?

--
We develop, watch us RoR, in numbers too big to ignore.

_______________________________________________
Rails mailing list
[hidden email]
http://lists.rubyonrails.org/mailman/listinfo/rails
Reply | Threaded
Open this post in threaded view
|

Re: Re: field update not happneing

Parker Thompson
On Fri, 16 Dec 2005, Mark Reginald James wrote:

|What kind of HTML element has the flash_msg id?

Ah, figured it out (thanks).  I was trying to replace the contents of a
div (also tried a span) using .value.  Switching to innerHTML, e.g.:

  $('flash_msg').innerHTML = msg;

fixed the problem.  I knew it had to be something silly, just needed my
assumptions questioned, thanks.

pt.

_______________________________________________
Rails mailing list
[hidden email]
http://lists.rubyonrails.org/mailman/listinfo/rails