Displaying 20 results from an estimated 5000 matches similar to: "Autosubmitted checkbox"
2008 Mar 02
2
check_box_tag remote_function
I have a collection of check_box_tags that look like the following:
<% for item in @items %>
<%= check_box_tag "item[item_ids][]", item.id, false, {:onchange =>
remote_function(:url => update_items_path, :with => "''items='' +
escape(value) "} %>
<%= item.name %>
<% end %>
My question is, how do I send all of the current
2006 Jul 11
0
Please please somebody RESCUE me Reg. form_remote_tag !
Hi frenz,
I need to update "div_main_data" on click of one submit button and I
need to update "div_member" on change of one select option. But couldn''t
find any solution at the moment.
If I use -> :onChange =>''this.form.onsubmit()''
this update the whole "div_main_data" as I couldn''t toggle the update
parameter
in
2006 Jul 11
1
form_remote_tag ISSUE !
Hi frenz,
I need to update "div_main_data" on click of one submit button and I
need to update "div_member" on change of one select option. But couldn''t
find any solution at the moment.
If I use -> :onChange =>''this.form.onsubmit()''
this update the whole "div_main_data" as I couldn''t toggle the update
parameter
in
2010 Mar 09
9
Ajax-submit form on "check box onclick ": why this error?
Hi there,
I need to have a checkbox which ajax-submits a form.
The following code throws an error "index 112009 out of string". What''s
wrong here?
==============================================
<% form_remote_tag :url => { whatever_url } do -%>
<%= check_box_tag ''whatever'', nil, whatever, { :onclick =>
2011 Oct 18
0
check_box_tag call action on change (AJAX)
Hi all,
I''m developing an application with Rails 3.0.9 and I have a checkbox
and I want to call a function when it is checked/uchecked.
I''m trying with:
<%= check_box_tag "mylabel" t.to_s, false, { :onchange =>
remote_function( :url => { :action => ''update_preview'', :id =>
t.to_s })} %>
in the "show" view and this in the
2006 Jun 06
0
Get value from form using rjs, and problem with Safari
Hi,
I have got two forms, the first is a textarea plus a link that activates
some javascript to change the form, the second activates some javascript on
the onchange event which changes it into a textarea form.
This works in Firefox, but not in Safari.
Also, I need the value which is selected. I''ve found an example that gives
the parameter to the javascript, like this:
<input
2006 Jun 06
1
Getting value of form using Ajax (and problems with Safari)
I have got two forms, the first is a textarea plus a link that activates
some javascript to change the form, the second activates some javascript
on the onchange event which changes it into a textarea form.
This works in Firefox, but not in Safari.
Also, I need the value which is selected. I''ve found an example that
gives the parameter to the javascript, like this:
<input
2006 Jul 02
6
remote form w/ evalScripts:true
Hello. I want to select an item from a select list and have that
result in an ajax call that updates two sections on the page. Here is
the code in the controller
def create
...
render :update do |page|
page.replace_html ''list_items'', :partial => ''lists/list_items''
page.replace_html ''add_item'', :partial =>
2005 Dec 21
3
How to make a drop-down automatically submit an AJAX form
Hi,
I know that to make a dropdown box automatically submit when you change
the value, you do this:
<select ..... onchange="this.form.submit();">
BUT i''ve got an ajax form, and if i do the above trick, it simply
reloads the ajax partial into the whole screen, rather than into the div
where it is meant to go.
I''ve already got it all working so that if you click
2006 Jul 20
0
Getting joined collections on a form
Greetings, I''m looking for suggestions on how to simplify getting customer
addresses on a form:
I''m jumping between controller and view several times; alternating between
rhtml and rjs, in order to display customers and their addresses on an
invoicing form. It''s very messy.
I have a one to many relationship between Customer and Addresses, each
customer has one or more
2006 Jul 21
0
Selecting customers and addresses in a form (was Getting joined collections on a form)
(Sorry if you have received this twice, I''m having trouble sending mail to
the rails list)
Greetings, I''m looking for suggestions on how to simplify getting customer
addresses on a form:
I''m jumping between controller and view several times; alternating between
rhtml and rjs, in order to display customers and their addresses on an
invoicing form. It''s very
2005 Dec 24
2
Ajax Help: Multiple Updates - ?
Hi!
Wondering if anyone can tell me what''s wrong with my code?
I''m trying to use the onChange event of a select list to update multiple
divs...
Agile Web Development with Rails (p. 403) suggests using ":complete =>
eval(request.responseText) instead of :update"
I''ve attempted the following test code:
# in the view
<select name="plist",
2005 Dec 21
3
Checkbox readonly
I declare some checkboxes :
<%= check_box_tag ''offers[]'', offer.id ,
@params[:offers].include?(offer.id.to_s) ,:readonly=>true %>
the result is :
<input checked="checked" id="offers[]" name="offers[]"
readonly="readonly" type="checkbox" value="1" />
But readonly doesn''t work ???
--
Posted
2006 Sep 10
2
Issue with radiobutton and remote_function in IE.
Hi there!
I did implemented the radio button with remote_function to update some
div via RJS.
It works perfect with FireFox, but behaves weird with IE. When I click
the radio button
it loads data (I see the indicator showing) but not updates the div with
info until I click
left mouse button anywhere.
It''s weird =(
Here is the snippet from .rhtml code
<td>
2008 May 10
0
can javascript handle 422 response
I''m toggling a check box via ajax using:
application_helper.rb: ...............................................................
def toggle_value(object)
remote_function(:url => url_for(object),
:method => :put,
:before => "Element.show(''spinner-
#{object.id}'')",
:complete
2006 Jul 12
0
updating two divs based on condition
Hi,
I need to update "div_main_data" on click of one submit button and I
need to update "div_member" on change of one select option within the
same form_remote_tag. But couldn''t find any solution at the moment.
If I use -> nChange =>''this.form.onsubmit()''
this update the whole "div_main_data" as I couldn''t toggle the update
2006 Jun 05
1
:onChange and AJAX forms
Hi,
I have this:
<%= form_remote_tag (:update => "item_type_list", :url => {:action =>
:list_item_type_for_brand}, :id => "form1") %>
<div>
Brand <%= select :current_brand, :id, @all_brands,{},{:onchange =>
"submit()"} %>
<input type="submit" value="Change" />
</div>
<%=
2006 May 10
0
Passing Muliple Parameters with remote_function
<select name="media" id="media" onchange="<%= remote_function(
:url => { :action => :show_performer_categories,
:rate_group_id => @rate_group },
:with => "''media_id=''+this.value''"
) %>">
I''m guessing that''s wrong since WebRick does nothign when I
2010 Jan 23
0
Problems with :onchange for radio_button_tag
Greetings,
I''ve been hitting my head to the wall over this for quite a while now
and don''t seem to be able to wrap my forementioned head around it.
Basically I have a list of users in a selection box and I have two radio
buttons: Sort by first name and sort by last name. This is what I have
in my view:
<%= radio_button_tag ''sort_by_last_name'',
2006 Apr 27
2
check_box_tag and :disabled => ''disabled'' problem
I''ve been using the check_box_tag to generate checkboxes for an application
I am working on and I''ve run into a little hiccup.
When I set the options for the checkbox to be { :disabled => "disabled" }
the checkbox becomes disabled, as I would expect. However, if I set the
checked value to true and keep the disabled option, the value for the
checkbox is not returned.