similar to: Remote function and returning value

Displaying 20 results from an estimated 100000 matches similar to: "Remote function and returning value"

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
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
2007 Apr 19
1
How to redirect to other action when it is called using ajax
Hi all, I am using javascript to call an action with some parameters. In that action i decide on the basis of parameters either to render some text on that page or to re direct to some other page. But its seems that my redirect_to method is not working from that action. Can anybody tell me some way of redirecting to some other action when that action is called as a remote_function from
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
2008 May 24
1
link_to_remote, image_tag, mouseover is this possible?
Hi guys, I was wondering if you are able to have a link_to_remote, having an image_tag and the link_to_remote has a mouseover event that updates a div. Does the image_tag need the mouseover event? I currently have: <%= link_to_remote(image_tag(@p_image.public_filename(:thumb)), :update => "big_pic", :onmouseover => {:action => :color_change, :id => @p_image.id})%>
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>
2009 Mar 23
1
Ajax not defined.
This is my code and I am trying to call remote function when somebody click on add button after selecting something from select_tag. Please tell me where I am wrong ? I am getting following error: Ajax not defined. <input type="button" value="< Add" class="button" onclick="<%= remote_function(:url => {:controller => ''users'',
2009 Jun 23
7
can't get remote_function working on rails 2.3.2
I''ve tried moving the code around in different ways, but so far I haven''t gotten remote_function to work for me (I''m using Rails 2.3.2 on my Mac). I want to make an AJAX call when I double-click a word on my page, and the Javascript function is being called when the ondblclick event is fired, but nothing happens when it gets to my the "new Ajax.Request" part
2007 Nov 28
0
dafault value of a textbox prompting user of what to enter
Hi, I want to create a textbox that will have default text like "enter author, title or ISDN number " which dissapears of when user types in something. Is there default attribute in rails for this? Or DO I need to go JS way? Regards, Sandeep G -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are
2009 Apr 02
1
"can't modify frozen string" error in Ajax.Updater
I''ve just deployed my RoR app to a host that uses dispatch.cgi instead of Mongrel and came across this issue when using AJAX. The same issue has been highlighted a year ago, (on this list) <http:// groups.google.com/group/rubyonrails-talk/browse_thread/thread/ 872fed1ff554c9a4> and (on Rails Trac) <http://dev.rubyonrails.org/ ticket/10365>. In short, when some browsers enact
2009 Jan 11
2
Got an error on returning data as json format when the data is nil
Hi there, One of my app''s actions returns data as a json format. If the data exists, everything works perfect. But if the data is nil, I get the following error. -------------------------------- ActionView::MissingTemplate (Missing template user/show.erb in view path /var/www/my_app/releases/20090110234348/app/views:):
2009 Feb 22
1
degrading ajax calls - how?
Hey - I have a few ajax calls in my app that I''m not really sure how to degrade to html. For the most part, these are functions that insert or remove elements to/from the dom. For example, I have my own edit-in-place on the data, which is called by start_edit action. This action renders an rjs template that replaces the view with an edit form. # view (partial) <tr
2006 Jun 15
0
retrieving parameter or selected value using remote_function
Hi, Can anyone let me know how to fetch selected option from the following select box : <%= select(:category_view,:name,@categories_choices, {:include_blank => false}, {:onChange =>remote_function(:update => "div_team_coverage", :url => {:action => :set_team_values} ,:with => "category="+ escape(value))} ) %> <div
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
2009 Aug 11
5
Dynamic drop-downs in a form_for using AJAX remote_function - Help
Hello - I am fairly new to Ruby on Rails, but feel like I am learning quick. I have what seems to be a fairly unique issue as I cannot find much out there that describes what I''m seeing. Hopefully it''s a very simple fix, and I simply can''t see the forest through all the trees! I am attempting to create 2 related drop-down lists in the same form_for, both using
2008 Feb 13
6
trouble updating partial from collection
I have a view where I render a partial over a collection. Each instance of the partial includes a <div> with an id specific to that instance. Inside the partial, there is a select tag for "year". I''m trying to change some of the contents of the partial when user changes the year. I''m using this in the view: <%= select_tag :year,
2008 Sep 09
6
Prioritizing Mailer Queue / Action Mailer
Hi, I have different kinds of mails going out. For eg: 1. signup 2. notification mails etc I am using mailer queue to avoid mongrels waiting on email to be sent. However, it makes sense to have signup mails go instantaneously whereas other mails can go to mailer queue. Has anyone done such thing? Any suggestions please? Regards, SG -- Posted via http://www.ruby-forum.com/.
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
2009 Feb 03
3
ROXML from_xml not returning an object instance...
Hello, I have two ActiveRecord classes. One is Route the other is Waypoints. I have constructed an XML representation so I can use AJAX to create a Route with all waypoints in a single create call to RouteController. When I call Route.from_xml(xmlString) it is not returning an object - it''s leaving the object (@route) nil, but not erroring. Any ideas? Here''s some code: