Displaying 20 results from an estimated 6000 matches similar to: "Execute controller function from RJS"
2006 Jul 02
6
remote form w/ evalScripts:true
Hello. I want to select an item from a select list and have that
result in an ajax call that updates two sections on the page. Here is
the code in the controller
def create
...
render :update do |page|
page.replace_html ''list_items'', :partial => ''lists/list_items''
page.replace_html ''add_item'', :partial =>
2006 Jul 26
7
syntax for specifying :html fallback on form_remote_tag
Has anyone gotten the :html option for specifying a ''fallback'' action if javascript''s not enabled working on form_remote_tag (or remote_form_for)? I can''t figure out how to specify the action that''s supposed to be invoked if js _is_ enabled.
Or maybe I''m just misunderstanding how this thing is supposed to work. I was assuming
2005 Dec 31
9
RJS Templates not conducting callbacks
I''ve run across a weird problem with RJS that I''m trying to figure out:
I have an application that was running 0.13.1 that I recently upgraded
to Rails 1.0. I wanted to use RJS templates, so I installed the plugin
and updated my prototype javascript file via ''rake update_prototype.''
I attempted to test the templates out via the following code, but the
AJAX
2006 Mar 18
9
RJS - not working in IE
I searched thru all the postings about RJS, and I didn''t find one person
who complained of problems specific to IE, but that''s what I''ve got.
My environment is:
Rails 1.0 + RJS Plugin
Updated Javascripts to Scriptaculous 1.5.3 (for evalScripts support)
Monkeypatched in_place_editor to support evalScripts
I have just started using RJS, and I have two .rjs templates.
2006 May 09
6
RJS, & mulitple Drop Down Boxes.
Hello Again Rails Folk!
I''m trying to creat a page similar to what the person is doing here...
http://mudabone.com/aietc/?page_id=410
Instead of doing it the way he/she has, I decided to use RJS files, or
at least I tried.
Here''s my view
<%= start_form_tag %>
<%= javascript_include_tag "prototype" %>
<p>
Union:
<div id="union">
2006 Mar 22
1
RJS - Still not working in IE
The previous thread on this topic got a little disjointed, so I thought
I''d summarize the issue again, in hopes that someone could help. To
re-iterate, this rjs works in Firefox and Safari on Mac, and in Firefox
on Windows. It fails, in IE on Windows. The failure is that the second
page.replace_html seems to do nothing.
My environment is:
Rails 1.0 + RJS Plugin
Updated
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})%>
2008 Nov 07
1
RJS show as 'try...' in AJAX update
Hi guys,
I am trying to display Javascript code after an Ajax call. It is
executing the JS code, but it''s also displaying it. It shows as:
try {
alert(...);
} catch ..
...
my controller code:
render :update do |page|
page.alert message_var
end
my Javascript code:
new Ajax.Updater("div_id", my_controller_url,
{ asynchronous: true,
evalScripts: true,
2006 Apr 05
23
how to create RJS visual effects callbacks
I''m trying desperately to get visuall effects callbacks working in rjs
templates to no avail What I''m trying to do is fade an image, change
the div with the image to a new image, and then fade the new image back
in. How would I go about this in RJS Here''s a simple line from my rjs
that I can''t get to work. It is not using callbacks so the
2006 Jul 06
7
form_remote_tag submitting to an rjs file.
I have the following form that I am trying to use, but for some reason,
the form gets submitted with out the params values.
<%= form_remote_tag(:url => { :action => :add_item_to_order }) %>
<tr>
<td>
<%=collection_select(:order_item , :item_category_id,
@item_categories, :id, :name)%>
</td>
<td>
<%= text_field
2006 Aug 25
3
RJS Error: Element.update is not a function
Hi,
I have implemented some RJS code and I have the same exact code in 2
different places. In one place I get the error "Element.update is not
a function" and the other place works fine. Any idea why this error is
coming? Breaking my head.
-Vinod
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on
2005 Dec 25
5
RJS not working?
I''ve been attempting to add a simple rjs ''delete'' method to my
project. However, no matter what I try, it simply doesn''t work. Even
the easy, easy stuff seems broken. (Yes, <%=
javascript_include_tag :defaults %> is being included in the template.)
For example, from:
http://www.codyfauser.com/articles/2005/11/20/rails-rjs-templates
VIEW:
<h1
2006 May 16
7
RJS head scratcher
I''ve been joyfully using RJS in a lot of our work lately, with no issues
whatsoever. However, I am porting an application to RJS templates that
we''ve had for a while, and having some issues.
When I use Firebug to see what is going on, the response comes back like
this:
try {
new Effect.Highlight("gi_error_row",{duration:20});
} catch (e) { alert(''RJS
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
2008 Jan 23
11
Rails 2.0.2 + RJS
Hi
I had ajax commenting on my app, which worked perfectly on Rails
v1.2.6, but does not work the same in Rails 2.02. Basically the
comment gets added, but the visual effects do not work (ie lines 2 + 3
of create.rjs)
create.js
page.insert_html :bottom, ''comments'', :partial => ''comment''
page.visual_effect :appear, "comment_#{@comment.id}"
2006 Aug 10
5
RJS in Internet Explorer to update a list box
Hi,
I''m trying some RJS to update a series of list boxes in which the user
selects a state, and the following list gets updated with a list of
counties, and the same for the next list of areas.
My code works perfectly (albeit a bit slow) on Firefox, but on Internet
Explorer it clears the list box (instead of filling it) and Netscape
shows all the counties cramped together on one
2006 Apr 26
2
RJS and Greybox : executing the js in the parent window?
Hi all,
Question:
Can a child window manipulate its parent window with RJS?
Example:
In an application a parent/master window shows a list of records. When
the users press ''edit'', a greybox windows pops up where they can update
one item attributes.
Problem: after the ''save'' and child window closing, the parent window
still contains the old attributes
2007 May 09
1
How can I change a form's onsubmit event handler using rjs?
Hi all,
I have a ajax form creating by "form_remote_for", whose url is to
create a new model by default. The page doesn''t change after the ajax
call on submit button so the form is still there after the new model
is created. But if I submit the form for the second time, I want to
update the formerly created model using an Ajax post.
I think I could render an rjs at the end of
2006 Mar 22
0
Changing the onsubmit event using an RJS template
Hi there,
I''m currently writing my first ROR application, and must say I''m
loving the framework. Just a quickie, which people will probably
instantly know the answer to. I''ve got a select box which I want to
be able to add values to on the fly using AJAX. I''ve got the form
all appearing and updating the database, however, what I want to be
able to
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