Displaying 20 results from an estimated 1000 matches similar to: "Ajax: update multiple DIV''s"
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 Jun 27
4
RJS Form Values
Hi,
I have the following code :
<%=link_to_function("? | China", update_page{|page|
page[''tags_en''].value = "China"
page[''tags_ch''].value = "?" }) %>
This updates two text fields with the China and ?. However I want to
append the values, not replace them. So I need something like this :
2006 Apr 07
6
Multiple view types for a single action?
Is it possible to have more than one kind of view for a specific action,
for example an .rhtml and a .rjs file to handle the view for the same
action?
I suspect not, but this makes me wonder if there a way to call the .rjs
file from within the .rhtml so the statements within it get executed?
Thanks,
Andy
2006 Jul 20
5
RJS where to put helper method?
Hi,
If I want to have helper method for my rjs, where''s the best place to put
it?
so for example:
--- bla.rjs:
page.replace_html ...
page.visual_effect ...
--- somewhere: (currently I put in application_helper.rb)
def replace_with_effect(page)
page.replace_html ...
page.visual_effect ...
end
--- bla.rjs:
replace_with_effect page
and is there a way to define the helper so we
2006 Jun 04
1
Image links in stylesheets?
Guys,
I understand the logic behind using image_tag in rhtml to maintain app
portability, but how do you link to images in a stylesheet maintaining
that same portability?
Thanks for your help!
B.A.
--
B.A. Baracus: I thought you weren''t crazy no more?
Murdock: Only on paper.
--
Posted with http://DevLists.com. Sign up and save your mailbox.
2006 Aug 10
2
Is it possible for a controller to throw up a message box?
I need my controller to give some feedback to the user by popping up a
message box. Does anyone have any ideas how this can be done?
Thanks
--John
--
Posted via http://www.ruby-forum.com/.
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
2008 Jan 15
2
rails rjs page object
Can anyone point me to api documentation for the page object that is
used in rails rjs files?
Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send
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 May 16
5
how to redirect after sendfile?
Greetings!
Is there a way to get RoR to redirect_to another action after doing a sendfile?
My little app lets the user enter a bunch of data and then creates an XML file from it. I''m using sendfile to let the user download the XML file. Once they download the file I want to take them to a new view that presents a logout button that will trigger a cleanup. But it looks like RoR
2006 May 03
4
default values
Hello,
I''m working with a postgresql table
CREATE TABLE elements (
id serial primary key,
c1 text default f1(),
...
cN text default fN()
);
But if I use de lines
@element = Element.new
@element.save
the values that element take are the nextval in the id field and nules in
all the other fields.
How can I get the defaults?
(but without rewriting the
2006 Jul 27
3
How do I update a div''s content in the controller?
Without using an RJS, is there a call I can do in the controller? All I
want to do is this statement, but in the controller:
new Effect.toggle(''notifier_nav'',''appear'', {duration:12.0});
Thanks,
Ben Lisbakken
--
Posted via http://www.ruby-forum.com/.
2006 May 17
4
.rjs templates undesiered output problem
Hello everyone, I am working with rjs templates in rails, and I''m amazed
of how simple it is to generate code with ajax, however I''am having some
troubles and I can''t seem to find a way to solve''em.
Whenever I put some code in the template, let''s say:
page.visual_effect :highlight, ''sitio37'', :duration => 3
I get the
2008 Nov 22
3
RJS page.update question
How does page.update actually work? I know its a wrapper for
Prototype.update but how does it get the partial in there?
Say I wanted to update a div with the contents of a partial manually
like this.
content = render(:partial => ''whatever'')
page.call "$(''my_div'').update(#{content})"
But his does not work. It keeps giving me weird errors about
2006 Mar 07
2
How to sort execution of multiple ajax-calls
Hi,
currently I execute 2-3 AJAX-Calls (located at the end of html-body) on
loading the page. I run into problems now because they are executed
parallel of course :)
How can I garuantee that the Calls are executed when the page has loaded
completely ?
And, more interesing, how can I make one AJAX-Call start when the
previous has completely finished ?
I''ve read about Effect.Queues - is
2006 Aug 01
6
Getting Started on RJS Templates
I definitely need to use RJS templates for my current application. I''ve
used Google for the past twenty minutes or so, yet I can''t find a good
resource that will get me started and show me what the page object can do.
Any links?
When an Ajax link is clicked, I''m trying to change the background of a
"primary" list item, as well as the background and text of
2006 Feb 23
2
find_by_sql aliasing issue when accessing attributes
I was recently having problems accessing attributes in an object. Can
somebody explain to me why this is, and if it is a bug?
I have the following code:
@archives = RapturePost.find_by_sql "select distinct
date_format(rapture_posts.date_created,''%Y-%m'') date_created from
rapture_posts where rapture_posts.site_id = 1 order by
rapture_posts.date_created desc"
I
2006 Mar 21
8
AS/400?
Any success stories using rails against a DB2 database on an as400?
If so, how?
Thanks
Ed Schechter
--
Posted via http://www.ruby-forum.com/.
2006 Mar 07
11
maintaining application state/urls
Hi All
Not specifically a scriptaculous question, but I was wondering how
people were going about maintaining access to their applications via
standard urls.
Say for example I''ve a shop at www.shop.com, and its pure ajax to load
in products. Now customer A wants to show a friend a product on the site
- giving him the url www.shop.com and telling him to click on a series
of links
2006 Apr 19
3
Determining screen size and/or resolution?
What''s the easiest or best way to determine the screen size from within a controller or view in Rails? My "divs" look great at 1280x800, but not so hot on 800x600. I want to dynamically alter the layout based on the resolution. Any hints regarding screen size or alternate ways of handling this issue would be appreciated.
Thanks!
-------------- next part --------------
An