similar to: Clearing text_field

Displaying 20 results from an estimated 20000 matches similar to: "Clearing text_field"

2006 Apr 20
0
Clearing text_field_tag -- Help PLEASE
I''m trying to clear the input fields on an Ajax form. Unfortunately, I''ve tried this just about every way I can think of and instead of clearing the fields, it''s clearing pretty much the whole page. I would ***really*** appreciate some help! The page has a form that allows the entry of two fields. The form exists inside a <div> with id=entry. When the user
2006 Apr 07
3
RJS removing content of div, but not div itself
Hi, I''m creating a list of ingredients on a page. When the user clicks the ''Add Ingredient'' button a record gets added to the db and the ingredient gets added to the page. On the page, each record is represented by a <div> with three <span>s inside. One of the <span>s has a link_to_remote to ''delete'' the ingredient. When the link
2006 Apr 23
5
Newbie Ajaxy Question
Hi all, I''ve been trying to figure this out by myself and while I feel I''ve made some progress, I feel kind of stuck. Let me see if I can explain what I''m trying to do. I have a very simple form with a text box and a text area. The text in each of these will eventually make it into a row in a table in my database. For now, the value in the text box represents a
2006 Nov 04
0
form_remote_tag problems with post url
Hi, I''m hitting a bump with the form_remote_tag, and wondering if anyone can help.. SO i''m trying to implement a tag-based search on a site and using routes, I can enter a url such as http://localhost/tag/query , which calls an action ''search'', and returns all the posts which are tagged with the word ''query''.. fine... In the
2006 Apr 14
11
Whats the best Ajax way to update a textarea''s text?
I am looking for a way to update the text-value within a textarea from an Ajax render call inside of a controller. Is there a way to do this without rendering an the partial containing the textarea? Thanks, Andy -- Posted via http://www.ruby-forum.com/.
2006 May 19
1
pass text_field to controller when using periodically_call_r
Hi. Can anyone help with this? In a view, I have a text_field_tag( :mytextfield ). I would like to pass the current value of that text_field_tag to a periodically_call_remote - something like periodically_call_remote( :url => { :action => :do_it, :thetextval => :mytextfield.value } ) - Any idea how can I pass and/or access the value of the text_field_tag in my do_it controller?
2007 May 29
0
Ajax sortable_element refresh
Hi, I have the following ajax example, with a list of counters, and two buttons for adding/removing elements. The list is sortable. There are two things that I don''t know how to do: . remove an elemet . when I add a new element to the list, that element doesn''t become sortable with the rest of the list Thanks, hugo #### View <html> <head> <title>Ajax
2005 Nov 25
0
question on rails , form_remote_tag and backbase
David, I been reading your book and going through the examples but i am stuck on th using the form_remote_tag. I am using the Backbase ajax framework with rails and protoype.js The following form.rhtml file <% if @guess %> <p> It seeems ''<%=h @guess %>'' is hardly the right answer</p> <% end %> <%= form_remote_tag(:update =>
2006 Feb 26
0
Ajax, MemoryStore and sessions
Have you ever worked with Ajax, memoryStore and sessions in Rails? I''m trying to pass a value through a session variable to various methods. I''m calling the methods with Ajax on a submit button. I do this twice on a page. The first time I pass a variable from the page to the controller and store it in the session and write a log entry. This works fine. When the second button
2006 Apr 10
2
RJS newbie - need help with iterating / existence test
Greetings! I''m new to Ajax and am trying to get a basic app working as a vehicle for learning it. The app is an extension of the cookbook tutorial. My intent is to be able to add a list of ingredients for a recipe. The page to add ingredients uses Ajax. As ingredients are added to the page they''re displayed in a "green-bar" format like that used in the Depot
2009 Jun 08
1
why can't I add a :class to text_field?
<%= text_field_tag ''login'' ,nil, {:class => ''line''} %> the old way work. <%= f.text_field :login, :class => ''line'' %> but why this doesn''t. -- Posted via http://www.ruby-forum.com/.
2006 Aug 29
1
Scope problem with form_remote_tag, ajax?
Hi all, I have tracked an odd behavior down to what I think is an issue of scope. In short, when I use form_remote_tag to establish an AJAX form, my database fields don''t get populated when performing an edit on the record. Those same fields will get populated using start_form_tag and no AJAX. I think that Ruby can''t find the local object that represents the database
2006 May 12
1
Uploading a file with form_remote_tag problem.
params[uploaded_file] is not recognised when i try form_remote_tag like this: <%= form_remote_tag :url=>{:action => "save_file"} ,:html=>{:multipart => true} <%=text_field_tag "name"%> <input type="file" id="uploaded_file_file" name="uploaded_file[file]"/> <input type="submit"
2006 May 06
5
form_remote_tag not posting data
I''m trying to use the form_remote_tag for the first time.. Here is my code: <%= form_remote_tag(:url => { :action => ''add'' } ) %> <td size=''100''><%= text_field_tag ''name'' %></td> <td size=''200''><%= text_field_tag ''email'' %></td> <td
2006 Apr 14
2
Nested AJAX remote_form in form?
I''d like to achieve something that is better described by the following code: <%= start_form_tag :action => ''create'' %> <%= text_area ''place'', ''description'', :cols => 100, :rows => 4 %> <div id="categories"> <%= form_remote_tag :update => ''categories'',
2006 Jun 26
3
syntax for observe_field( :with =>
Greetings! What is up with the syntax of this thing? I mean, if the only thing I can send back using :with is the field being observed, then why in the world is the syntax so convoluted? For example, what I''ve been able to get working is: <%= text_field_tag(''date'', illness_date, :size => 30) %></p> <%= observe_field(''date'', :url
2006 Aug 18
3
setting a value of text_field from a controller
Hi, I need to set up an initial value from controller. In my views I''ve something like <%= text_field "object", "name" %> and would like to do something like this from controller def index @object[:name] = ''default value'' end but still got an error. Object doesn''t have database model (and will not have) Thank you PS: now using
2005 Mar 25
4
ajax and clearing the form
Hi I played a little bit with rails+ajax, works fine... but how do I reset the form? I tried: --- <%= form_remote_tag(:html => {:name => ''form_update''}, :url => :url_new_item_with_ajax, :update => ''container'', :loading => "Toggle.display(''new-item''); $(''new-item-desc'').innerHTML =
2006 Apr 08
1
text_field behaviour with validations
Hi, The text_field method sets the class of the field to "invalid" when the object you specified is invalid (when using validations). This is to facilitate working with validations. Is there anything else it does? In a certain non-standard situation I''m forced to use text_field_tag, instead of text_field. This means I have to take care of the validations myself as well.
2006 Apr 10
3
form_remote_tag : additional onsubmit funct. possible ?
Is there a way to add onsubmit functionality to a form_remote_tag with an additional javascript directive? eg I''d like for an inline javascript to make the form''s div container hidden as soon as the button is pressed to avoid having it possibly get pressed again ( sometimes the rails response is slow enough for a user to think they need to re-press it ). example: <div