Displaying 20 results from an estimated 2000 matches similar to: "Newbie needing help! How to read from database?"
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 05
7
Conditional toggle button
I have a link_to_remote that updates the content of a hidden div and
makes it appear.. But I want it to hide the div and not execute the
link_to_remote function on the second click. What''s the best way to do
this? I''m thinking I can do it in RJS maybe, but I''m not sure if
there''s a nice Rails-y way to tell if a div is hidden or not..
I''d also
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 Feb 11
6
Rails 1.1?
I have a few very basic questions.
Is anyone using rails 1.1?
How/Where can I get Rails 1.1 (I don''t see it on RubyonRails.org?
What are the issues involved in moving from Rails 1.0 to Rails 1.1?
If I move to Rails 1.1, can I downgrade? Just curious.
Thank you very much for your assistance.
Frank
---------------------------------
Yahoo! Mail
Use Photomail
2006 May 18
3
"About your application’s environment" Effect
I was wondering if there is a Rails method that does something similar
to the "About your application?s environment" link on the "Welcome
Aboard" page you get when you first install Rails.
What the link does is make and AJAX call, then blind down and up using
AJAX.
Thanks.
--
Posted via http://www.ruby-forum.com/.
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}"
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 Mar 08
2
fade out and then fade in....how to make it work?
I''m trying to have one image fade out and then another slidedown upon
completion of the ajax call. I can''t get the timing correct. How do
you do it? Here''s what I''m trying (this does not work)
<%= link_to_remote(image_tag(url_for_file_column(product, "image_url"),
:update => ''right_content'',
:url => {
2006 May 09
2
name and class href attribute in a link_to_remote
I have a link to remote and I''m trying to get the name="" and the
class="" attribute in the href so the link will come out like this:
<a href="action" onclick"ajax(action)" name="Title Of Link"
class="someclass">
So far the link looks like this:
<% for course in @courses %>
<%= link_to_remote
2006 Apr 18
4
update_page yields escaped code in callback
Hi All,
The subject pretty well describes what I am experiencing. This line in
an .rhtml template:
<%= link_to_remote menu_item.humanize,
{:update => ''section'',
:url =>{:controller => menu_item},
:complete => update_page do |page|
page.activate_tab("#{menu_item}_tab", ''menu_'')
page[''section''].hide
2006 Jun 11
6
page.update_html not executed
Hi,
when doing:
render :update do |page|
page.replace_html ''suggested_contractors'', :partial =>
''contractors''
page.visual_effect :highlight, ''suggested_contractors''
end
I got js as output, it is not executed, return html *contains*:
try { Element.update("suggested_contractors", "
\n 12345678910\n
\n
2006 Apr 04
7
Not getting the whole RJS-based partial rendering concept ...
I have been trying all kinds of different ways to produce what I think
should be a simple effect, but have not had any luck yet and apparently
I am not following the general idea...
What I am trying to accomplish is the following (part 1 works and part 2
does not):
1. One of my views has a link_to_remote which updates a div container
with a table of data
my example is
<div
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 Mar 13
2
How to apply an effect to a link_to_remote :update without using evaluate_remote_response?
Hey all,
I''ve been trying to apply a slide-down (or highlight) effect to a "New
card" link on my application. Because the item is *new* and I''m simply
updating it at the top, I can''t know what the div id is before I make
the request. link_to_remote :complete => visual_effect(:slidedown)
doesn''t do what I want it to do. My current solution is:
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 Jun 19
2
content_tag question
Am trying to insert a link to delete via ajax in my RJS template.
Can one use content_tag and link_to_remote like this in a RJS template?
a = content_tag(''a'', link_to_remote("Delete", :update => "categories",
:url => {:action => "delete", :name => category.name}))
-Thanks.
--
Posted via http://www.ruby-forum.com/.
2006 Jan 10
5
using dynamic element ids with visual_effect
Mike and I demo an Ajaxified version of the Depot application in the
Rails Studio. Part of the demo is a cart in the sidebar which updates
when you add a product to it. As well as updating the div, it also
highlights the most recently added link item. Right now, we do it with:
<script language="JavaScript">
function flash_cart(request) {
var id =
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 Jul 06
2
rjs rails to execute?
I have the following:
layout:
<%= javascript_include_tag :defaults %>
[...]
<div id="menu">
<div id="myrandom"></div>
<%= render :partial => ''menu'' %>
</div>
menu partial:
<%= link_to_remote "Generate Text",
:update => ''myrandom'',
:url => { :action =>
2006 Jun 21
2
Using RJS to highlight one LI if using insert_html on an UL?
It seems common to use RJS for quickly adding and highlighting a list
that is having content added to it like this:
http://rafb.net/paste/results/Z3m32g48.html
... where "my_list" would be an UL and the partial would insert a LI.
Given that example, is there an easy way to highlight only the newly
inserted LI instead of the whole UL? The only way I can see to do it is
to give