Displaying 20 results from an estimated 224 matches for "onchang".
Did you mean:
onchange
2006 Mar 07
6
how to add onchange javascript event to select field
I would like to add javascript ''onChange'' event handling for a select
field, such as
<%= collection_select("job", "client_id" , @clients, "id", "name") %>
with onChange="xxx"
Anyone know how to make this work?
Thank you,
Scott
--
Posted via http://www.ruby-forum.com/.
2006 Jun 14
4
Select box onchange problem
...when the user
changes his selection. (the method to be called, will store the
selection from the user).
This is my code:
<%= select(''variety'', ''variety_id'',
Variety.find_all.collect {|c| [c.description, c.id]},
{},
{"onchange" =>
url_for(:controller => ''account'',
:action => ''add_to_varietytmp'')} ) %>
HTML output:
<select id="variety_variety_id" name="variety[variety_id]"
onchange="/account/add_...
2006 Feb 07
1
onHover: can u explain me this function ?
...usSibling != element) {
var oldParentNode = element.parentNode;
element.style.visibility = "hidden"; // fix gecko rendering
dropon.parentNode.insertBefore(element, dropon);
if(dropon.parentNode!=oldParentNode)
Sortable.options(oldParentNode).onChange(element);
Sortable.options(dropon.parentNode).onChange(element);
}
} else {
Sortable.mark(dropon, ''after'');
var nextElement = dropon.nextSibling || null;
if(nextElement != element) {
var oldParentNode = element.parentNode;...
2006 Mar 29
4
using onchange options in forms
Hello,
I''m trying to get a select field to update a view via the ''onchange''
option. I''ve seen examples of it here in the forum where people hardcode
the forms and use javascript to trigger the change (and nearly all have
complained that it''s a hack) and I''m wondering if anyone has a more
elegant solution using the embedded ruby met...
2006 Aug 01
6
Newbie: How to use text_field with Java Script
<input type="text" name="date1" id="dateField1"
onchange="magicDate(''dateField1'');" onfocus="if (this.className !=
''error'') this.select()" />
How could I generate above text filed using ruby?
I am not sure how to give the options such as onchange, onfocus, id and
so on?
could some one pleas...
2006 Jan 06
12
Auto refreshing a page based on select change
Hi all,
I have a select helper form on a web page which contains a list of dates. When
the user selects a date, one of the other forms on the page needs to be updated
based on the newly selected date.
Is there a way to catch this event in Rails? Are we talking Ajax here? Or is
there a simpler way?
Thanks,
Dan
2006 Oct 28
2
onchange="document.forms[0].submit()" - how to CANCEL
Goal: I want to auto-send a form whenever any field changes. The page
will be updated "via Ajax", so standard submission is cancelled.
Idea: Add onchange="document.forms[0].submit();" to every field
Problem: Can not cancel form submission. Browser redirects to "results"
page, which is of course JavaScript meant to dynamically update the
page.
RHTML snippet:
<%
remote_form_for :estate, :url => { :action => :evaluate_...
2009 Jan 28
1
How to give onchange for select_year rails helper....
<%=select_year(Date.today,:include_blank=>true, :start_year =>
Date.today.strftime("%Y").to_i, :end_year => 1999)%>
i am using rhis helper... now i want to give onchange here....
Please help me to solve this ....
thanks in advance
JK
--
Posted via http://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 gr...
2005 Jul 25
0
Code for onChange is missing
Hello,
onChange as advertised for Sortable cannot work, as there is code missing.
// onChange event handler
element.sortable = {};
element.sortable.onChange = options.onChange;
needs to be added to Sortable.create() to make it work.
Bye,
Martin
2008 May 08
2
DOM builder and HTML events
Hey guys,
My team is have an issue using the Prototype DOM builder. For some
reason, the onchange event isn''t being registered for an input box.
$(''targetDiv'').update(new Element(''input'',{type:''text'', id:''blah'',
onchange:''alert();''}));
When we insert via the .innerHTML parameter, it works just...
2007 Jan 25
2
React on select_tag (onchange)
...@rowsperpage = params[''rowsperpage''].to_i
...
In the view I have the field, where I like to react directly.
...
<%= select_tag("rowsperpage", options_for_select( [[5, 5], [10,10],
[25,25], [50,50], [100,100],[200, 200],[500, 500],[1000, 1000]],
@rowsperpage ),
:onchange=>"alert(this.form.rowsperpage.options[this.form.rowsperpage.selectedIndex].value)"
) %>
...
The alert was only an example (I test it also with render, but without a
solution).
But I could change the values with no reaction.
What must I do, that the controller react direcly on my c...
2006 Jul 02
6
remote form w/ evalScripts:true
...', ''list_item_type'', :value => ''List'' %>
Which list?
<%= select ''list_item_link'', ''list_item_id'', @lists.collect{ |l|
[ l.name, l.id] },
{ :include_blank => true},
{ :class => "formfield", :onchange => "this.form.submit()" }
%>
<%= end_form_tag %>
And here is the code in the template that actually works (using a GET
instead):
Which list?
<%= select ''list_item_link'', ''list_item_id'', @lists.collect{ |l|
[ l.name, l.id] },
{...
2007 May 25
2
Sortable onChange fires for every mouse movement
Anyone found that sometime between 1.6.4 and 1.7.1 beta releases of
Scriptaculous that something has changed with the way that the
onChange is fired?
In 1.6.4 it fired once, now in 1.7.1 beta it fires everytime you move
the mouse.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group.
To post to this group, send email...
2006 Nov 23
3
Prototype Safari onSubmit Issues
Hi folks. Another Prototype question.
I have a simple ajax form which I want to return results on an
onChange. Works in IE6 (Win) and FF, but Safari doesn''t seem to take
the onChange too well. Upon the return key, it blanks out the form.
Upon tabbing to the next field (actually the next form), I get the
results.
<form name="form1" id="form1" action="#" method=&...
2011 Aug 29
7
:onchange in rails 3
Hi,
Anybody know why :onchange works here...
<%= select_tag "Minisections",
options_from_collection_for_select(@minisections, :id, :title, :selected
=> @minisection.id), {:onChange => "{alert(''Minisection has been changed
to x !'')}"} %>
but NOT here (to call a function)...
<...
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>
<%= end_form_tag %>
which returns a list of items.
Its working when I click on the submit button, but when I use the
:onchange to submit the form, the AJAX calls is sent...
2006 Feb 10
0
AJAX update for select list onchange?
Hi Rails Users,
I have a select list that I''d like to use to update a div onchange.
Right now I just have the div appear, but not update:
<%= select_tag( "profiles_select", option_tags = @profiles,
{ :onchange => "new Effect.Appear(''the_profile'',
{ duration: 0.5 } );"...
2006 Mar 24
2
Slider: passing the slider object to onChange and onSlide?
I''m working with a couple of slider objects on one page.
I''m using onChange to do a couple of things. onChange passes the new value
of the slider, but not the slider object itself. Has anybody found a way to
get the object?
More details: A simple example would be to do the following: Put multiple
sliders on a page. Now, when a slider is moved, change it''s...
2006 Jul 14
0
datetime_select and onchange?
Is it possible to add an onchange handler to a datetime_select call?
I realize the complication exists in that the helper actually creates
many different select elements, but rails could just spread the
onchange across all of them.
-Payton
2008 May 05
1
Passing values selected with onchange remote_function
How do i pass the value selected from a drop down selection and then
extract it in rjs
<% select("what", "hello", @selection, {}, {:onchange =>
remote_function(:url => "test", :my_variable => "hello again") } ) %>
thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this g...