similar to: link_to_remote v. text_field?

Displaying 20 results from an estimated 30000 matches similar to: "link_to_remote v. text_field?"

2006 Jan 14
2
link_to_remote and an id that points to a text_field
Hi! I''m having trouble with the following thing: I have a view with a text_field. What I want is to call a remote method with the value of the text_field as the :id I supply to link_to_remote. How do I do this? It''s about an empty form, so the text_field doesn''t have a value when the page is loaded. Grtz, Wouter -- Posted via http://www.ruby-forum.com/.
2008 Oct 03
7
form_remote_tag and :with
I am trying to pass the result from a javascript function along with the result from a text_field with form_remote_tag. This is what I have so far, but no go: <% form_remote_tag(:url => {:controller => ''requests'', :action => ''create''}, :with => "''data=''+request()", :update => ''request_sent'' )
2005 Dec 31
0
Fall-Through for link_to_remote?
I see in the document for form_remote_tag a little note about Javascript: A "fall-through" target for browsers that doesn?t do JavaScript can be specified with the :action/:method options on :html Which works by populating the ACTION html field for the form with a real URL, not a "#". Great. Can this be done with link_to_remote as well? I see no similar note in the
2006 Aug 02
0
"RJS Error: TypeError: $(element) has no properties"
i have lots of divs, which are added via link_to_remote. now i want to delete them with a link_to_remote button for each. i am giving them ids with the same name and a serialized number. when trying to access them with javascript/rjs, strange things happen: "RJS Error: TypeError: $(element) has no properties?. is this a rails, rjs or prototype bug? or am i missing something? see my code
2006 Jan 14
3
link_to_remote where the url contain a javascript variable
Ok, so I am basically trying to use ''link_to_remote'' and pass the value of a javascript variable as an argument. Something like that: link_to_remote "my_link", :update => ''my_div'', :url => { :action => "my_action", :var => ''my_var'' } Basically,
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 Jun 12
3
Multiple Form Fields with Same Model?
Hello, I''m trying to create a form that will allow a user to submit a list of phone numbers, but the list is dynamically created. Thus allowing my form to submit an unknown number of phone numbers. Here is some of the code I have been trying: <%= collection_select( "phone[]", "phone_type_id", PhoneType.find(:all, :order => "position"),
2008 Jul 23
0
Link_to_remote object missing
Hello, I''m in troubles trying to use ''link_to_remote'' on Rails 2.1. Having this page: <h4>Editing project</h4> <% form_for(:project, :url => project_path(@project), :html => { :method => :put }) do |f| %> <p> Name <%= f.text_field :name %> Date <%= calendar_date_select :project, :target_date, :time =>
2007 May 10
2
link_to_remote fix, should this be added to edge rails?
After looking at the link_to_remote tag for the first time, I found it broke when javascript was disabled. Below is one possible solution I found and would like to suggest that this idea is promoted into rails. # # provide fix for link_to_remote tag when javascript is not enabled def link_to_remote_fix(text, options) link_to_remote text, options, :href => url_for(
2006 Feb 12
2
link_to_remote (AJAX) and tables: IE issues, validation?
I have a table that lists domain names, with a form next to it to add new domains. I have AJAXified this so that new domains are immediately added as table rows. This works fine in Firefox 1.5/Win, but not in IE6/Win. Domains are added into the database, but the HTML table is not updated unless you reload the page. Some googling tells me there are issues with e.g. link_to_remote updating
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 Jul 21
10
Using an image button for "link_to_remote"
All, I want to do an AJAX request using a custom image button. I currently have this as a standard button action using "button_to". What I need is the button equivalent of "link_to_remote". Is there a helper that I can use, or do I need to build it by hand? I see button_to_function(), but that sets me up to call a Javascript function, not post to a Rails action. Or can
2005 Dec 15
2
link_to_remote and browser compatibility
link_to_remote generates the javascript: new Ajax.Updater(...). Have I missed something or doesn''t this handle browsers with javascript support but without XHR support? What I''d like to do is: 1. If the browser supports XHR, use XHR 2. If the browser supports javascript (and perhaps even if the XHR request fails) do a POST via javascript 3. If the browser doesn''t
2005 Dec 09
0
How to use JavaScript in link_to_remote?
Cheers, I have a form with an input inside that I want to be able to submit by itself (I want to let the user create new tags with this input and use them to tag the whole content that is posted by the rest of the form). I have this layout: <form ...> <input type="text" id="new_tag" /> <%= link_to_remote "Schlüsselwort hinzufügen",:url => {
2006 May 05
0
JavaScript Prompt and link_to_remote
Hi all, I would like to get one of the parameters for a link_to_remote with JavaScript prompt. So far I have this: link_to_remote(image_tag("/images/interface/add.png"), :before => "$name = prompt(''Name?'')", :url => { :action => ''add_child'', :id => node, :name => XXX }, :update =>
2006 Apr 02
0
Re: updating the dom - Solution
Easy solution. I am using the behaviour.js package. Using this, the solution was to apply a Behaviour.apply(); command when the XMLHttpRequest() is complete. So my solution was to use the form_remote_tag properties to help me call this like such: link_to_remote("questions", :url => { :action => ''curator_questions'', :uid => curator.id, :tid =>
2006 Jul 21
0
Ajax page.replace_html model validation errors
I have the following setup: A model: that validates using helpers like: validates_presence_of, etc.. A view: called ''new'' which renders a partial The partial: _form which has error_messages_for and a form_remote_tag , submit_tag and end_form_tag An action ''create'': that gets executed via the submit_tag in the _form and which in case it can''t
2006 Jul 24
0
Ajax page.replace_html model validation render partial errors
Hi; I have the following setup: A model: that validates using helpers like: validates_presence_of, etc.. A view: called ''new'' which renders a partial The partial: _form which has error_messages_for and a form_remote_tag , submit_tag and end_form_tag An action ''create'': that gets executed via the submit_tag in the _form and which in case it can''t
2006 Apr 21
3
rjs in multiple ajax page
Sorry for the long explanation but I''m having trouble integrating rjs into my form page. Here''s my page: <div id="posts"> <ul id="post_list"><%= render :partial => ''list_results'', :collection => @posts %></ul> <p><%= link_to_remote(''+'', :url => {:action =>
2006 Nov 04
0
headers[''Content-Type''] & link_to_remote on Rails Edge
I''m on rails edge and am calling an after filter on my actions. Works except for my ajax calls via link_to_remote. When I inspect headers, I see the ''Content-Type'' is key for an object rather than a string. Shouldn''t it be a string? Anyone know if this is a bug or if I''m dealing with this incorrectly. Thanks, Jamie The code: after_filter