Jeffrey L. Taylor wrote in post #997405:
> See inserted comments below.
>
> Quoting linda Keating :
>> new_capacity = event.capacity
>> format.xml { render :xml => @line_item, :status => :created,
>>
>>
> new_capacity and event are local variables in the controller method.
> They are
Ruud - I hope you don't mind but I emailed you some material on the
Prototype and Scriptaculous libraries.
Might be in your junk mail box?
On Feb 28, 9:18 pm, ruud wrote:
> Hi Gavin,
>
> I tried your suggestion; this time the javascript function isn't
> called at all.
>
> <% form
Hi Gavin,
I tried your suggestion; this time the javascript function isn't
called at all.
<% form_tag({}, {:id => 'radioform'}) do %>
<%= radio_button_tag( 'datum', 'geen', @geendatum )
%>
<%= f.label( 'geen datum' ) %>
<%= radio_butt
If observe_field isn't going to call more than once, but you could try
observe_form instead?
<%= observe_form :new_item, :function => 'datum_geklikt()' %>
I know it's not ideal but instead of passing arguments true and false
to the function, have the function determine the current value of the
r
On Feb 27, 7:23 pm, Gavin wrote:
> what do you have in the date_clicked() function now?
Hi Gavin,
I had the same idea:
function datum_geklikt (geenDatum)
{
var doc = window.content.document;
alert('jep');
doc.getElementById( 'dagid').disabled = geenDatum;
doc.getElementById
Hi Ruud
Hmm - I've never used observe_field to call a js function, usually
just for rails-ajax calls.
If I were calling a js function like so, I'd normally just
add :onclick => 'date_clicked(true)' to the radio buttons.
There should be a way to call the js function using observe_field
though
hi Gavin,
I inserted two observe_field calls, essentially replacing the onclick
values on the radio button tags. But it turns out that only the first
time a radio button is clicked, the :function of the observer is
called. So if I switch back, nothing happens. It does if I reload the
page.
Do I m
On 26 feb, 15:33, Gavin wrote:
> The JS function you've given seems fine to though and for such a
> simple operation, I'd probably just go with that.
> By including <%= javascript_include_tag :defaults %> you'll also have
> access to the application.js file in your public/javascripts dir.
> Y
Hey ruud- You could attempt this using ajax in an effort to keep
things neater.
If you add <%= javascript_include_tag :defaults %> to your views then
rails will also load up the prototype library.
This gives access to loads of helpful js and ajax functions.
http://api.rubyonrails.org/ - rea
9 matches
Mail list logo