On Dec 3, 7:19 pm, Joe Peck <[EMAIL PROTECTED]> wrote:
> > If you think of the javascript that will be generated it's just going
> > to be
>
> > toggle_fruit_price(apple_price);
>
> > whereas you want it to be
>
> > toggle_fruit_price('apple_price');
>
> > Fred
>
> Hmm, well I have also tried
> <script type="text/javascript">
> function toggle_weight_boxes(lqname) {
>     $('lqname').disabled = (!$('lqname').disabled);
>   }
> </script>
>
> and that doesn't work.  I'm sure I'm only a tiny bit off, how else
> should I write this?

That wasn't the problem - the toggle_fruit_price function was fine as
it was. The problem is with this statement

toggle_fruit_price(apple_price);

Forget that it's js for a second - that statement isn't legal if there
is no variable named apple_price, which there isn't

Fred

> --
> Posted viahttp://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to