Displaying 20 results from an estimated 30000 matches similar to: "RJS templates before, during and after"
2006 Feb 08
3
Using shared RJS templates
I''ve got an action in my application controller that needs to call a
shared RJS template. Typically it''s actually being called by subclasses
of the application controller.
I''ve tried this..
def action
...code..
render :partial => "shared/template"
end
with ''_template.rjs'' existing in the shared folder.
The problem that crops
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 Apr 11
12
RJS
I am trying to use RJS as shown in this tutorial :
http://www.codyfauser.com/articles/2005/11/20/rails-rjs-templates
However it does not seem to work. I am not getting any excpetions in
the logs. Here is what the logs say :
Parameters: {"action"=>"add", "controller"=>"homepage"}
Rendering homepage/add
The homepage/add is named add.rjs
I know
2006 May 04
12
RJSCallback 0.1
Announcing RJSCallback 0.1
The RJS Callback plugin is being developed to provide Ruby On Rails with
the ability to easily call RJS templates for the various callbacks
associated with AJAX function calls (e.g., :before, :loading, :complete).
Currently this plugin automatically detects, loads, and renders RJS
templates with specific names and inserts them in the appropriate spot
in
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 Jul 16
7
RJS and Action Renders but page doesn''t update
All,
I am trying to perform a simple ajax task and am having some difficulties with the page showing the response. The action performs, but no response on the page.
I have found examples on the web and I believe I have copied and pasted exactly what works from the demo site. However, on my system it isn''t finishing. For a simple test, I have limited it down to an alert.
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
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 Jul 14
5
Ideas for AJAX pagination
Hi,
I am looking for ideas on how to remove the last item from a
paginated page when a new item is inserted, thus leaving only 10
elements on the page.
Currently I have a form that inserts with AJAX, but as expected, each
post added to the page just increases the number of posts leaving 11
on a page that should only be displaying 10.
I have unique ID''s for each post (e.g.
2006 Aug 09
2
Can :before and :success move from view file into .rjs file?
Within the RJS template is there a way to specify when the visual_effect
should occur?
I''m trying not to repeat the :before and :success blind_down
visual_effect statements throughout my views.
It seems like the rjs templates can only take visual effects statements
in the form of
page.visual_effect :blind_up, ''divname''. I can''t figure out how to add
2006 Apr 21
3
rjs in multiple ajax page
Sorry for the long explanation but I''m having trouble integrating rjs into my
form page. Here''s my page:
<div id="posts">
<ul id="post_list"><%= render :partial => ''list_results'', :collection =>
@posts %></ul>
<p><%= link_to_remote(''+'',
:url => {:action =>
2009 Jul 24
5
padawan seeks advice from jedi masters to create toggle box via ajax/rjs before slitting wrists with ruby powered light-saber.
I AM TRYING TO MAKE A DAMN TOGGLE BOX, BUT USING MY OWN GRAPHIC AND HAVING
THE MOUSECLICK TRIGGER BOTH SWITCHING THE GRAPHIC (via AJAX) AND SAVING THE
STATE IN THE DATABASE.
I GOT IT ALL WORKING WITH NORMAL HTML GET CALLS TO THE SERVER, BUT I NEED IT
TO BE AJAXIFIED SO THAT THE PAGE DOESN''T RELOAD.
AND TO COMPLICATE MATTERS, IT HAS TO WORK IN A TABLE WITH AN ARBITRARY
NUMBER OF ENTRIES,
2006 Apr 22
3
rjs woes, any hints?
I''ve pared my rjs experiment down to what seems a bare minimum. When I click
on my link_to_remote, the rjs executes, returns the correct javascript to
the browser, but it doesn''t update the div I''ve specified. What appears to
be coming back from the controller is:
Element.update("my_form", "hello, rjs");
I''m tearing my hair out.
2006 Mar 08
6
Difficulty with params hash and submit_to_remote
Hi,
Is there any trick to initializing the params hash via submit_to_remote()? I
have a form with two submit methods - the regular, non-AJAX method, and the
AJAX method. The regular method works like a champ. The submit_to_remote
invokes the correct controller, but the params hash is empty except for the
values for :action and :controller.
I''d show my code, but it''s on
2006 Jun 13
5
strange RJS behavior
I used RJS extensively in my last web app with no problem.
I''m just beginning a new one and having a very odd problem.
The called method, get_names, retrieves some values from the database,
then ends:
render :layout => false
the get_names.rjs file is rendered into Javascript, but then is just
dumped as Javascript (text) into the browser:
e.g:
try {
2006 Jun 30
6
using rjs
Hi
I am relatively new to ruby on rails. I want to use this javascript
bundle:
http://prototype-window.xilinus.com/index.html
How would I call those functions in an rjs file?
example:
win = new Window(''window_id'', {title: "Sample", top:100, left:350})
win.getContent().innerHTML = "<h1>Hello world !!</h1>";
win.setDestroyOnClose();
2006 Apr 28
10
Sharing RJS Templates
Hello All,
I''m enjoying the simplicity and power of RJS templates in Rails 1.1, but am
perplexed about sharing them. I have several templates that I would like to
access in various controllers, but if I moved them to
views/shared/whatever.rjs, my app can''t seem to find them. I changed the
name to _whatever.rjs and referenced them as "shared/whatever", but no
luck.
2006 Apr 16
11
RJS templates not found
I am running Rails 1.10 and wanted to check out the RJS templates.
Rails doesn''t seem to find them.
I did issue the rake comment update_javascripts and that did not correct
the problem. RJS is part of 1.1 right?
Any ideas?
Thanks.
--
Posted via http://www.ruby-forum.com/.
2006 Jan 29
2
GetText and rjs templates?
hi,
is it possible that gettext don''t work with rjs templates?
i''ve just tried this simple example
blog_controller.rb :
class BlogController < ApplicationController
def index
end
def dosomething
end
end
index.rhtml :
<html>
<head>
<%= javascript_include_tag :defaults %>
</head>
<body>
<div id="test">Some text to change
2006 Apr 09
4
Best RJS process for what I''m trying to do...
I just wanted to ping this off the list to get some advice since I''m
now pulling my hair out. Thanks in advance for taking any time to look
at this. It''s much appreciated. Now, my problem is my RJS is working
but it''s not inserting how I want it to insert. I have a partial I''m
rendering in my view that looks like this:
<ul