similar to: Re: Re: page.replace_html "#{var_containing_id_name}", :partial

Displaying 20 results from an estimated 100 matches similar to: "Re: Re: page.replace_html "#{var_containing_id_name}", :partial"

2006 Apr 07
2
Re: page.replace_html "#{var_containing_id_name}", :partial
Jeff Coleman <progressions@...> writes: > > Jason Tuttle wrote: > > The subject line says it all. -- Is there a way to do something like: > > > > page.replace_html "#{var_containing_id_name}", :partial => ''edit'' > > > > That line of code does not work, but I would like to pass the name of > > a variable to
2006 Apr 07
1
Re: page.replace_html "#{var_containing_id_name}",:partial
On 4/7/06, Chris Hall <christopher.k.hall@gmail.com> wrote: > page.replace @user.id, :partial => "edit_form" Thanks a lot Chris. -- Unfortunately, it didn''t quite work when I tried it that way. However, when I tried it this way: page.replace_html "#{@user.id}", :partial => "edit_form" It worked! Thanks again!! : ) Jason
2006 Apr 07
2
page.replace_html "#{var_containing_id_name}", :partial => ''edit''
The subject line says it all. -- Is there a way to do something like: page.replace_html "#{var_containing_id_name}", :partial => ''edit'' That line of code does not work, but I would like to pass the name of a variable to page.replace_html. This variable would contain the id of the div I want to update. Anyone know if/how I could do that? Thanks! : ) Jason
2005 Dec 13
2
Ajax.Request onComplete
Hello, I have a small class where i want to use attributes of the instance when an ajax call returns, so I wrote: *var* MyClass = Class.create(); MyClass.prototype = { initialize: *function*(form_id, rendered_id) { this.form_id = form_id; *var* edit_form = $(form_id); *var* rendered_node = $(rendered_id); *if* (!edit_form || !rendered_node) { this.enabled = *false*;
2006 Jun 19
10
Trying to delete from a unordered list using ajax
I have a controller method as such: def delete @category = Category.find_by_name(params[:name]) @element_id = @category.name Category.delete_all(["name = ?", @category.name]) end (For the purpose of this exercise, category names are unique) I have the corresponding delete.rjs file: if @element_id page.remove :id => @element_id page.visual_effect :highlight,
2006 Jun 24
6
Ajax fade effect
I have a list of categories, when I delete one of them, I want that item to fade and then get removed. So I do the following: 1. home_controller: def delete @category = Category.find_by_name(params[:name]) @element_id = @category.name Category.delete_all(["name = ?", @category.name]) end 2. delete.rjs: if @element_id page.visual_effect :fade, @element_id
2007 Nov 14
1
has_many_polymorphs and acts_as_list ?
First, BRAVO for this wonderful plugin: has_many_polymorphs ! Now my problem: 4 models : Collection, Page, Fragment, Belonging (which is the join table): 1 class Collection < ActiveRecord::Base 2 has_many_polymorphs :elements, 3 :through => :belongings, 4 :from => [:pages, :fragments, :collections], 5 :as => :collector, 6 :parent_order =>
2005 Oct 14
6
Draggables onDragStart
Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/gif Size: 1027 bytes Desc: image001.gif Url : http://wrath.rubyonrails.org/pipermail/rails-spinoffs/attachments/20051014/b3c26edf/attachment.gif
2006 Jan 25
2
Using ''GET''-method in Forms
Hi all, I''m using a selection-list / dropdown-list to choose an element in a number of grouped elements. Is there a way of passing an element_id to the form AND using the HTTP-''get''-method? I found that the <% start_tag %> has a :method-switch as an option, but it passes the arguments on like "/controller/action/?action=1". I would need something like
2006 Sep 29
3
no setClassName or removeAllClassNames in prototype - why?
Often I have the need to set one class name to an element. I don''t care what was there before, just remove it and set it to the new class. I don''t see any easy way to remove all the class names or to set just one class name. Why is this? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on
2006 May 20
7
Polymorphic, many-to-many, self-referential data model
No matter what I try I''ve been unable to work how to get this to work with the cool ActiveRecord helpers. I''m not sure if it''s possible, Josh Susser''s blog suggests it is, but damned if I can work it out... I have: Container which can contain one or more Element. An Element is a polymorph of either a Container or a Chunk. An Element can exist in one or more
2006 Mar 24
1
Multiple table relationships
Hello, I''m just starting out with some Rails development and have the following table structure. I understand how to do a two table has many join but I actually need to relate a third table. Here is my structure: components id name updated_at elements id name updated_at element_types id name updated_at components_elements component_id element_id
2007 May 09
1
How can I change a form's onsubmit event handler using rjs?
Hi all, I have a ajax form creating by "form_remote_for", whose url is to create a new model by default. The page doesn''t change after the ajax call on submit button so the form is still there after the new model is created. But if I submit the form for the second time, I want to update the formerly created model using an Ajax post. I think I could render an rjs at the end of
2006 Apr 16
2
AJAX effect when inserting new div
Can some one point me in the right direction? I''ve got several pages that will respond to user input by creating a new div in the content area. I want that new div to visually expand into view or flash with a background color rather than just appear. Thanks. -- Posted via http://www.ruby-forum.com/.
2006 Apr 14
11
Whats the best Ajax way to update a textarea''s text?
I am looking for a way to update the text-value within a textarea from an Ajax render call inside of a controller. Is there a way to do this without rendering an the partial containing the textarea? Thanks, Andy -- Posted via http://www.ruby-forum.com/.
2006 Aug 07
5
RJS Change Background Color
What''s the page.method to change the background color of a DOM element? I''m trying to change the background color of a couple of styled <li>''s when an Ajax link is clicked. Thanks, David -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060807/63de04bf/attachment.html
2006 Jan 16
11
Preventing bubble
I''m trying to prevent double ajax requests when I have nested onclick handlers. I have a table with clickable column headings (for sorting by that column). I have onclick handlers on both the <th> and the <a> link so that clicking anywhere on the table heading should work. <th onclick="window.location.href=''http://foo?sort=foo'';">
2006 Aug 07
1
Unable to page.replace_html from rjs
I am having problems updating a div defined in a partial using both Element.update and page.replace_html in an rjs. I can put a link_to_remote in the partial using an :update, and the div updates fine. Does anyone have any idea why this might be happening? In the partial: <div><div> . . <div id="question_<%=question.id%>_error"></div> . (if a
2006 Jul 20
0
page.replace_html = Safar scrollbar bug?
If I replace the content of a div with new content which is too tall for the browser window, I get a scrollbar on the right. -- So far so good. But... If I then replace the content with content which DOES fit inside the browser window, Safari doesn''t remove the scrollbar! If I then resize the window ever so slightly, the scrollbar disappears. -- It ONLY happens in Safari. Has
2006 Jul 26
3
Getting Ajax.Updater or page.replace_html to render js?
Hey guys, I, for the life of me, cannot figure out how to get Ajax.Updater or page.repalce_html to render the javascript in a partial. Upon page loading, the partial gets rendered fine. But when called up to render through an AJAX function something goes wrong. Are you guys getting this error??? -- Posted via http://www.ruby-forum.com/.