Displaying 20 results from an estimated 2000 matches similar to: "RJS page.delay timing issues"
2006 Jul 21
1
RJS Failing
This code was working before I created the update_link_list method in
the helper below (everything was in the controller). I can successfully
create a new link but I get a TypeError when I leave all form fields
blank -- I expect to see validation error messages.
---
#link_controller.rb:
def create
link = Link.new(params[:link])
saved = link.save
num_links = Link.find(:all).size
2006 May 08
3
Can you apply effects to elements create in same RJS file?
I am trying to create a new element in a list and highlight it.
I am doing the following in my rjs file:
page.insert_html :after, ''bananalist_header'', :partial => ''banana''
page.visual_effect :highlight, "banana#{banana.id}", :duration => 1
The first line creates a new element with the id= ''banana3'' say...
The second line then
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 03
6
Rjs $("aaa").insertHtml is not a function error
Hi,
I''ve searched the list and found that someone had the same problem as me
http://lists.rubyonrails.org/pipermail/rails/2006-May/043760.html
I''m have in my page a link like this
<%= link_to_remote ("Add
#{image_tag(''add.png'')}",:url=>{:action=>''addProduct''})%>
and in my controller
def addProduct
..................
2006 Mar 03
1
rjs isn''t update_page problems
i have a list of, for example, meal_names. Basically, I can submit a name
and the name I add shows up in the list.I had this working wehn i created an
actual add.rjs template for it. So feeling good about my self, I attempted
to move it all to the controller and use some update_page goodness. Now it
the ajax middle doesn''t happen. I don''t get any errors but the list
2006 May 30
0
The ARTS Plugin: Another RJS Testing System
If you missed it, I''ve written a plugin for testing RJS that uses
(basically) the same syntax as the RJS templates themselves. Here''s a
taste:
assert_rjs :alert, ''Hi!''
assert_rjs :assign, ''a'', ''2''
assert_rjs :call, ''foo'', ''bar'', ''baz''
assert_rjs :draggable,
2006 May 20
1
RJS returned javascript written straight to page
hi there,
I have in my controller, the following to catch a link_to_remote:
def form_part_add_personnel
@credit_types = CreditType.find(:all)
p = Credit.new()
p.id = rand.to_s[2..-1]
render :update do |page|
page.insert_html :bottom,
"script",
:partial => ''films/form/personnel'',
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 =>
2006 Nov 02
5
RJS error in internet explorer
hey all,
got a rails app i''m finishing up. i have a little ajax on one of my
pages where the person can choose a doctor from a drop down list and if
the doctor isn''t there they can click a link which blinds down a little
form to add a doctor. after they submit that mini-form the page updates
the div which houses the drop-down so the doctor shows up. works very
nicely IN FIREFOX.
2006 Jun 08
3
RJS wierdness - Content div display js code
Hi,
I have a link_to_remote name ''Show notes'', which calls an action that
uses this RJS template:
page.replace "notes_remote", :partial => "notes/hide_notes_link"
page.insert_html :top, "notes_list", :template => "notes/list"
page.visual_effect :highlight, ''notes_list'', :duration => 3
Works great. The
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
2006 Jan 19
1
rjs problems
Hi,
I am having trouble with rjs templates. Basically I want the item_div
to fade if its already open and then display the new item that the
user selected with the visual effect: appear. The code below causes
the browser (firefox on osx) to open the div and then close it again
as soon as it is open:
page.visual_effect :fade, ''item_div'', :duration => 0.5
page.replace_html
2006 Mar 03
0
re: rjs update_page problems
my apologies for my previous butchery of the english language...
i have a list of, for example, meal_names. Basically, I can submit a name
and the name I add shows up in the list.I had this working when i created an
actual add.rjs template for it. So, feeling good about my self, I attempted
to move it all to the controller and use some update_page goodness. Now the
ajaxy magic doesn''t
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 18
6
RJS - Insert at top of table?
Quick question regarding RJS and inserting to the top of a table. Here''s
the view I''m working with:
<table id="links-list">
<tr>
<th>Display title</th>
<th>URL</th>
<th>Description</th>
<th>Category</th>
</tr>
<% for link in @links %>
<tr id="link-<%= h link.id
2006 Jun 17
2
RJS templates - newbie
I am trying to test drive RJS templates in Rails 1.2. Here is what I
did:
create table categories (name varchar(255) );
rails RJSTest
cd RJSTest
rake update_javascripts
script/generate controller home index add
script/generate model category
Note: When I did a rake update_javascripts, I did not see any output.
I configured database.yml to talk to mysql.
Next I wrote
2006 May 30
4
Hide parent element
I have some code that calls a partial to display one or more blocks
within a div tag. I want to have a close button (or cancel link) that
will fade that block but leave the others. Here is the code:
LINK:
<%= link_to_remote "Add Miscellaneous Link", :url => { :action =>
:add_iyc_link } %>
add_iyc_link.rjs:
page.insert_html :bottom, ''links'', :partial
2006 Jun 01
0
Possible RJS Implementation?
Hi there,
I have a question regarding updating elements of a two different divs with
one click. I have two lists. One list holds items that are entered into a
contest, and the other list holds items that aren''t currently in the
contest. One item can only be in one list at a time.
Each list has a partial that renders the items with corresponding actions.
The items in the current contest
2006 Apr 27
7
RJS & Ajax question...
Hi,
I''m trying to convert an older Rails application to use Ajax. I''ve
already moved my edit and show actions so that, instead of displaying as
separate pages, they appear in a <div> on my list view.
However, I have two problems:
1) When the user saves the changes, I want to put all the ajax changes
in an RJS template. However, form_remote_tag :url =>{:action =>
2007 May 15
5
Problem with RJS and/or Prototype.js =>ResponseText is blank
Hi, I''ve got a real head-scratcher. I''ve got a standard Ajax form using
form_remote_tag, which calls a controller action which adds a comment
and then sends back some JS via RJS which updates a few items on the
page.
It did work fine but (and I''ve no idea what has happened) now it
doesn''t. It calls the controller action but gets an empty response back
and