Is there a way to set a session variable in a check box that’s not in a
form nor linked to a controller? The checkbox value would also be the
value of the session variable I want it to set. I assume I have to put
this in a form. Any suggestions?
Is there a way to set a session variable in a check box that’s not in a
form nor linked to a controller? The checkbox value would also be the
value of the session variable I want it to set. I assume I have to put
this in a form. Any suggestions?
Thanks very much in advance!
Mike
just an idea, but you could do an ajax call on an onchange event of the
checking-of-the-box:
create the function
and then just do an action in the ExampleController
def set
session[:checkbox] = params[:session_setter]
render :nothing => true
end
all untested code…might need to modify the ajax statement above to
pass the param[:session_setter] in “parameters:…” but an idea, no?
hth
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.