similar to: javascript that remote_function creates

Displaying 20 results from an estimated 2000 matches similar to: "javascript that remote_function creates"

2006 Jan 21
3
Passing ruby variable via remote_function (JavaScript)
Hi, Brand new to this so please excuse anything obvious that I don''t yet get. Here''s what I''m trying to do (This is all in a .rhtml file): As a simple test I create a local variable called ''localVariable'' and give it the string "Hello" like this; <% $localVariable = ''Hello'' %> Next I want to call a function
2006 Jun 15
0
Include JavaScript variable in <%= remote_function %> call?
How can I do this? For instance, something like: <script ...> function check_duplicate(name) { <%= remote_function :url => {:action => ''check_duplicate'', :name => name } %> } </script> Obviously the above is just a dummy mockup. I have much more complex (and complete) sections of code that need to accomplish a task like this. Anyone know of a
2006 May 31
1
Problem with combining rails helper and javascript
Hi! I''d like to make ajax request after effect fade finishes. There''s a callback in Effect class - afterFinish, but it requires the code to be in function() {*here*}. When i write :afterFinish => remote_function() it generates following javascript code: afterFinish: new Ajax.Updater() and i need: afterFinish: function() {new Ajax.Updater()} How can i do it? I need to
2006 Mar 23
1
Rails AJAX question, calling remote_function in a loop
I think I may be missing something here. I have a collection of people I want to run through. For each person I want to use AJAX to make a calculation and update the page with the results. First I tried to do this with just links, which works fine. It looks like this <% @eligible_players.each do |player| %> <tr> <td> <%= link_to_remote( player.player_name,
2006 Feb 16
0
RJS Question
Hi, What would my method call in an rjs template to produce something like: new Effect.BlindDown($(''commentList'').lastChild); I know if I just wanted to the blind effect I would: page.visual_effect :blind_down, "row_#{@new_item.id}" but how would I call it if I want the ".lastChild instead of passing a particular id? thanks, scott.
2005 Nov 25
0
Using link_to_remote/remote_function outside of a Controller
Hello! I have a problem that is quite anoying! In side my Controller it is no problem to use the link_to_remote/remote_function function to produce html stuff to include in my .rhtml file. BUT if I want to do this in another object, for eample if I inside my controller (init_test) want to do like this: my_dropdown->get_html in which I want to perform the link_to_remote/remote_function
2011 Feb 02
0
Converting rails 2 to 3 remote_function error
I''m still very new to RoR and had built a site for a friend. I''m now trying to port it to version 3 and am having an issue with remote_function. Right now, in a layout file, I have an image_tag and for :onclick I am using the following: :onclick => remote_function(:url => { :controller => ''rcg'', :action => ''nav_click''}, :with
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
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>
2006 Jul 30
2
how to use remote_function :with option?
I''d like to send some simple info to my controller using the :with option for remote_function remote_function :url => url_for(:action => ''my_action''), :with => ??????? But I don''t know anything about JavaScript. How can I use the :with option to send a simple parameter to the controller? I''ve tried a few things, but I haven''t
2005 Oct 11
2
Pushing Javascript Helper to external file.
I have a table and when I mouseover a row I want a pop-up with some additional information for that specific row (called remotely). I can do this easily with something along the lines of... onmouseover="<%= remote_function(:updated => "notediv", :loading => " Element.show(''note'');", :url => {:action => ''get_note'', :id
2006 Jun 12
0
Passing parameters to ''remote_function''
Hi, I am trying to use the ''remote_function'' helper method from the PrototypeHelper class on a the onblur event of a text_field for filling a form with data via AJAX. How can I get the value of the text_field for making a query to the database in the controller action? <%= text_field("item", "code" , :onblur => remote_function(:update =>
2006 May 10
0
Passing Muliple Parameters with remote_function
<select name="media" id="media" onchange="<%= remote_function( :url => { :action => :show_performer_categories, :rate_group_id => @rate_group }, :with => "''media_id=''+this.value''" ) %>"> I''m guessing that''s wrong since WebRick does nothign when I
2006 Jun 11
4
remote_function posting?
Hi, I''ve noticed that my remote_function calls are resulting in POST requests. As a result, my routes do not apply since it does not generate a url based on the parameters, but simply posts to the raw url with post data. I want to make a GET request instead of a POST. How can I do that? Has anyone else run into this? Thanks, Ryan -- View this message in context:
2010 Aug 18
2
[Rails 3] remote_function ?
Is the remote_function still valid in Rails 3 as it seems many of the Prototype helpers have been replaced ? (link_to_remote, ...) where can I find any link on it ? not in the standard doc I guess .. thanks for you feedback -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to
2006 Jan 11
1
can remote_function update two div simultaneously?
hi all i m using remote_function , & i need to update two divs at same time (so no :success/:failure).... is there any posiible soln for this thanks rohit --------------------------------- Yahoo! Photos Ring in the New Year with Photo Calendars. Add photos, events, holidays, whatever. -------------- next part -------------- An HTML attachment was scrubbed... URL:
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
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
2010 Jan 30
2
passing multiple objects with remote_function
Hey, I can successfully pass a single object from any form field to my controller via: Select Year: <%= collection_select("vehicle", "year", @availableYears, "year", "year", {:prompt => "Select a year"}, {:onchange => "#{remote_function(:url => {:action =>
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