similar to: Specifying Javascript events for form fields

Displaying 20 results from an estimated 4000 matches similar to: "Specifying Javascript events for form fields"

2009 Sep 02
8
select_month helper
I''m trying to rewrite a fusebox-like application (Active4D plugin to 4D database) in RoR/postgres and I''m doing okay - but keep running into things that stump me. It seems like it takes me hours to figure out something that I could have written in pure code in minutes. The select_month and select_day helper has been my latest waste of time. All I''m trying to do is add
2005 Dec 12
1
Search screens with dates
Tried googling and searching the lists for this. I''d like to do a search on some dates and naturally enough use the date helpers. I have a number of problems: -- datetime_select wants an active record model -- select_datetime does not take the options that datetime_select take - specifically :order that leaves me with something like <label>Date/Time
2006 Jun 17
2
problem with select_date
In my form I have these items: <%= select_year Date.today, :start_year => Schoolyear.get_startdate.year, :end_year => Schoolyear.get_enddate.year %> <%= select_month Date.today.month %> No matter what I do, in my controller I can''t seem to access the selected year and month. I have tried params[:month].to_s and also
2008 Feb 26
2
Specify HTML options on select_year
Rails 1.2.3 It appears that the select_year helper doesn''t accept HTML attributes as part of the options array. Does anyone have a way to successfully pass an :onchange attribute in to the select_year helper? I''m going to do it with Javascript directly for now. Thanks, Wes -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You
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
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)... <script type="text/javascript"> function xyz() {
2008 Jul 04
4
Routing and Parameters
Greetings. I have a route something like this: map.calendar ''/tasks/:year/:month'', :controller => ''tasks'', :action => ''calendar'', :year => /\d{4}/, :month => /\d{2}/ (Ignore the obvious problems of invalid data.) I''m trying to create a form that will allow my users to navigate from one month/year to the next.
2006 Apr 26
2
Problem with auto-submitting AJAX form
Hello, I have a form generated with form_remote_tag that contains a selection list. I would like to auto-submit the form when the user makes a choice in the selection list, so I added an option :onchange => ''this.form.submit()'' to select_tag Now what happens is that when I make a choice, the partial template get''s rendered as expected, but not replacing the
2007 Jan 25
2
React on select_tag (onchange)
Hi, I''m new in developint rails (but I love rails). I would like to react on changing a field in the view (no model field) from a selection box to show the number of rows (which I used in the controller). In the controller I read the params-hash: ... @rowsperpage = params[''rowsperpage''].to_i ... In the view I have the field, where I like to react directly. ...
2010 Oct 19
0
Ajax & Table Display Filtering based on Selected Option
My scenario: On a department''s products page (index.js.rjs), there is a table showing the products with their id, name, category. The view of this table is specified by a partial file called _index.html.erb. I''m going to add in a selection/option drop down menu above the table to show all the product categories. When the user selects a category from the drop down menu, Ajax
2006 Feb 05
0
How can i specify default time to datetime_select tag
I want to specify a different default time to datetime_select tag how can i do that. also i was looking at rails helper code ----------------------------------------------------------------------- module ActionView module Helpers module DateHelper def to_datetime_select_tag(options = {}) defaults = { :discard_type => true } options = defaults.merge(options)
2006 Sep 27
0
adding id and class to date select helper.. is it possible ?
I need to observe a select_month or select_year tag... as I would like to have an observe_field on them.. is it possible ? if yes how.. if no, is any trick to do it ? thanks a lot kad -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
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 } );"
2010 Dec 22
1
'No route matches' error with select_tag
Rails 3: I have a view books/:id/show.html.erb - in the view, I have a form with a select tag to pick a template, that on dropdown should submit the form which rerenders the page based on the selection: <%= form_tag book_path(@book) do %> > > <%= select_tag "template[]", >> options_for_select([["Template1","template1"], ["Template2",
2008 May 08
0
On 'Back' button of browser, drop down doesn't get refreshed
Hey guys, i have a drop down in my UI, which value gets filled by session[:sale]. <%= select_tag :sale_id, options_for_select([["Select Sale", "0"]] + @sales.collect { |s| [s.name, s.name] }, selected = session[:saleid]), { :id => "sale_id", :onchange => "search_verify();" } %> I have a post on, ''onchange'' event of it. if i
2008 Dec 02
1
form_for with partial using do |@f|
Is it possible to pass this FormBuilder object to a controller and then back to a partial? I have a form rendering a partial that i would like to update with a call to my controller based on user selectable parameters, but when the AJAX comes back, i get this error message because i cannot pass a form builder object between the controller and the view: "undefined method
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/.
2008 Apr 24
2
select_tag and link_to
Does ROR allow passing the chosen value from a drop down using select_tag into link_to ? Basically I want to do something like: <%= select_tag( "name", options_for_select(%w{John Doe Jane })) %> <%= link_to "Delete", { :controller => "myname", :action => "add", :id => name },
2007 Dec 02
4
select and passing some javascript
Hello, After reading and reading the documentation, I can''t append some javascript function into a select. It''s not possible ? documentation: ------------------------------------------------------------- select(object, method, choices, options = {}, html_options = {}) some code: ------------------------------------------------------------- return select(:id, :year, [
2007 Jan 22
0
dropdown list
hi i am new to ruby and i have installed ferret for search using text box for search by the string in the text box insted of that i am trying to implement a drop down list,with the selected item in the drop down it should search. problem hear is that the search is not going by the item please help me The code is: <input type="text" name="query" value="<%= h