Displaying 20 results from an estimated 5000 matches similar to: "Ajax "Waiting..." flash while round-tripping"
2006 Apr 14
2
Nested AJAX remote_form in form?
I''d like to achieve something that is better described by the following
code:
<%= start_form_tag :action => ''create'' %>
<%= text_area ''place'', ''description'', :cols => 100, :rows => 4 %>
<div id="categories">
<%= form_remote_tag :update => ''categories'',
2006 May 10
2
Redirect whole page from AJAX action that updates a div
Hi,
I am calling an action via AJAX to update a div. The action needs to
redirect the page in under certain circumstances. However, if I just use
"redirect_to" in the action then of course what happens is that the page
I want to redirect to replaces only the div, not the entire page, and I
get messy nested layouts.
Is there a way around this? Can I redirect the entire document from
2006 Jun 28
2
Assign CSS class to Link to Remote
I''m trying to get link_to_remote to assign a CSS class to the link it
generates. My code is as follows:
<%=
link_to_remote "Show Full Info",
:update => "fullcontact" + reparray.last.to_s,
:url => "/cm/full_contact/" + reparray.last.to_s,
:classname => "contactlink"
%>
Which produces this HTML:
<a href="#"
2006 May 31
1
Best way to render stuff inside a div and pass variables?
For example, I want to click a button or a link, then without leaving
the page, i want the content of a <div> to change accordingly if I click
the link1 I want the content1 to show up inside the <div>here</div>
I made it possible by using:
<%= render :partial => "icons", :collection => @packages, :locals => {
:@icon_name => "-add-black-" }
2006 May 13
5
Ajax Checkbox using Rails
Hi,
I''m trying to have a checkbox, that when clickes sends an update to the
server and in turn modify the UI with feedback on the success of the
operation.
The main difficulty I''m encountering is that I can''t pass the checkbox
value if I use the standard PrototypeHelpers.
I''m using remote_function to build the function call, but it doesn''t
allow
2006 Apr 04
2
How to add CSS tips to link_to_remote?
The following code of tag clouds implementation:
<%= link_to(h("<#{tag}>"), "tags/listmytag/#{tag}", { :style =>
"font-size: #{font_size}" } ) -%>
I want to change it to ajax style:
<%= link_to_remote "<#{tag}>",
{ :url => { :controller => ''tags'', :action => ''listmytag'', :id =>
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 Jun 01
1
link_to_remote show then hide
Hi,
I have a link_to_remote and it update a div.
After the first click the div is opened with the information.
Now I want to be able to close hide the div .
How should I do it.
Someone at the IRC told me to use toggle.
But what I want is a bit odd. I want that it will not do again
link_to_remote but toggle.
Tnx
Kfir
2006 Apr 03
1
Q: periodically_call_remote ( how to make it execute just once? )
I posted this ealier on the web forums but noticed a similar question
about this function and one user responded to try this list instead. If
anyone can help I would greatly appreciate your suggestions.
Q:
Is there a way to use periodically_call_remote to run just one time
instead of every '':frequency'' seconds?
I tried putting the call inside the div container thinking it
2006 Apr 07
3
RJS removing content of div, but not div itself
Hi,
I''m creating a list of ingredients on a page. When the user clicks the ''Add Ingredient'' button a record gets added to the db and the ingredient gets added to the page. On the page, each record is represented by a <div> with three <span>s inside. One of the <span>s has a link_to_remote to ''delete'' the ingredient. When the link
2006 Oct 17
2
back-translation and round-tripping
i'll be doing some experiments myself,
but i thought i'd ask here first about
back-translation and round-tripping
with markdown and its xhtml output.
the object is to take markdown output,
reduce it back to a markdown text-file,
then regenerate the output again and
compare it with the "original" output,
repeating if necessary until there exists
a pair of files that give perfect
2007 Mar 23
11
Is there such a thing as button_to_remote?
I''ve changed my destructive link_to statements in favor of button_to.
But what if I want to make an .rjs call with that button?
Seems like we need something equivalent to link_to_remote, so that the
button can make an ajax request instead submitting the form.
Or am I missing the point entirely?
Jeff
--~--~---------~--~----~------------~-------~--~----~
You received this message
2010 Jan 30
2
passing multiple objects with remote_function
Hey,
I can successfully pass 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
=>
2006 Jul 14
9
DRY Javascript Degredation
Hi,
It seems there must be a better way to do this than what I am
currently doing.
I have a simple app that collects a users thoughts along with their
email address and their first an last name. On a page that lists all
the users thoughts they can click on a link to "add a thought" which
then displays a form with ajax. My current methodology for this is
not very dry. If js is
2006 Jul 14
3
Accessing the Model class from Controller
Hi,
I wonder if there''s an easy way to access the associated Model class
from its Controller. Something that would allow me to write snippets
like the following:
class PeopleController < ApplicationController
def some_method
person_model_class =
self.some_method_to_retrieve_the_person_model_class()
end
end
Cheers,
Marco
--
Posted via
2006 May 08
7
How to get difference between two dates in days???
Hi,
I want to calculate difference between Current date & previous date
(stored in database). The difference should be in days. Hhow to do
that??
PLs tell me.
Thanx in advance.
Prash
--
Posted via http://www.ruby-forum.com/.
2006 Apr 27
12
Execute controller function from RJS
Hi all,
I wonder if it is somehow possible to execture or redirect to a
controller function from RJS?
Right now I do:
def foo()
render :partial => ''executeagain''
end
_executeagain.rhtml
<script>
new Ajax.Updater(''elmntID'', ''/test/foo/'', {evalScripts:true});
</script>
This will loop I know :)
How can I achieve the same
2006 Jul 23
1
some question about ''observer_field''
Is the observe_field (ActionView::Helpers::PrototypeHelper )
can be apply to any html tag? (such as div)
I tried to apply ''observe_field'' to observe the content of
<div> tag, but, as the observed <div>''s content was changed,
there was nothing happend.
for example (in test.rhtml):
<%= link_to_remote "test", :update=>"content1",
2006 Aug 16
6
error with edge rails
I''ve started an app with rails 1.1.6 then ran freeze_edge. My app
will not run with rails in the vendor folder. Have I forgot to do
something? I"ve been without the internet for the last two months.
Has something changed?
2006 Jul 24
1
Injecting actions into controllers
Hi,
I''m trying to write a plugin that should inject an action into the controller.
Please note, not just an instance method, but also an _action_, one of those
that are listable by running ControllerClassName.action_methods.
I wrote the following code:
def render_field_search(name, object, controller, options = {})
controller.class.class_eval do