similar to: Include JavaScript variable in <%= remote_function %> call?

Displaying 20 results from an estimated 50000 matches similar to: "Include JavaScript variable in <%= remote_function %> call?"

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 07
0
javascript that remote_function creates
I''m tring to use remote_function instead of writing all the javascript out, but am having difficulties.. I have this code in a layout: <body onload="<%= remote_function(:update => ''show_active'', :url => {:action => ''show_active_bugs''}, :complete => visual_effect(:blind_down, ''show_active'')) %>">
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 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
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,
2010 May 24
5
how to pass javascript variable to controller
i have a JavaScript variable and i need to pass that to controller with the remote_function method. how do i pass this? -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to
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
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
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
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
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 Feb 07
4
Dynamic url with javascript? - Help Please
Hi, I''m trying to call a remote function when a combobox option is selected, passing as an argument the current value of the combobox (paramenter "panel_id": <select id="server_interface_jack_switch_panel"
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 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 Jul 10
2
inline javascript in partials
When rendering the following partial, the <script> block isn''t getting rendered at all. Does rails strip this out or is it some limitation of the browser? <% remote_options = { :update => update, :with => "Form.serialize(''#{form}'')", :url => { :action => "process_multiple" } } %> <% do_before ||= nil %> <% click_fn =
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