Displaying 20 results from an estimated 145 matches for "remote_function".
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 of my function....
2006 Jan 21
3
Passing ruby variable via remote_function (JavaScript)
...hich is expecting to
receive as input a variable (InputVariable). Now, this all works if I
hard code in a string in place of $localVariable, but I don''t want to do
that. The variable is being sent as the name of the variable and not its
contents. Do I need to escape something???
<% remote_function(:update => :name_of_div,
:url => { :controller => ''nameOfController'',
:action => :nameOfAction },
:with => "''InputVariable='' + $localVariable") %>
My question is, how do I get the $localVariable to convert to its
content within th...
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 co...
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 R...
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 function
and then return the ht...
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 had...
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
--...
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 checkbox values
(item[item_ids][]) in the onchange? Currently, I am only getting the
value of the changed...
2006 Apr 22
2
selected value
I would like to pass the value selected in a select statement back so
that I can use it in the controller, through using a remote_function
call, and I cannot figure out what I am doing wrong:
view rhtml:
<select id="widgets_id" name="widgets[id]" onchange="<%=
remote_function( :update => "parts", :url=> { :action => :loadParts } )
%>">
<%= options_from_collection_for_...
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 => ''pressed=home''
This being just a snippet...
2010 Jan 30
2
passing multiple objects with remote_function
...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
=> "update_from_year"},
:with =>
"''vehicle_year_id=''+value")}"}) %></li>
What I would like to do is pass all the form values (4) to the
controller with 1 :onchnage ac...
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(:bl...
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" ,
:...
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...
2006 Mar 23
1
Rails AJAX question, calling remote_function in a loop
...when you click on a player''s name
it runs the calculation and updates the page correctly.
Now my question is this, how can I do this so that the user does not
have to click on the names in order to make that call. I was looking at
the JS reference in the rails API, and it seemed like remote_function is
the way to go. I tried the following
<% @eligible_players.each do |player| %>
<tr>
<td>
<%= remote_function(
:update => "playerList" + player.id.to_s,
:url =>{ :action =>
:calc_wins_losses_for_player, :...
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.
-------------- ne...
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 Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rub...
2008 Dec 15
1
remote_function in IE with select input onchange
Here is the code:
http://pastie.org/339967
Generated HTML: http://pastie.org/339969
This works great in Gecko and Webkit based browsers, but IE throws an
error: "Object doesn''t support this property or method". Any clues?
Thanks,
Nik
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on
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 way to accomplish this tas...
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 id="div_team_coverage">
<%= render(:partial => "team_coverage_data")%>
</div>
And I want to know...