similar to: .rjs files

Displaying 20 results from an estimated 30000 matches similar to: ".rjs files"

2008 Sep 29
4
RJS is not loaded
Hello, I have here an issue which is really critical for me (it for my university work and I would like to not delete this feature). It based on a Rails 1.x tutorial which I use now under Rails 2.x. It contains the refreshment (adding content or records) of an div via RJS/JS. I access the RJS via (Controller): respond_to do |format| format.html { redirect_to :controller =>
2009 Apr 20
1
RJS sporadic error message
I have this form that allows a user to enter a username and save it, assocciating your profile with theirs via an id. A list gets updated and a partial is displayed. The problem is that when I hit the submit button to this form to make this all happened I (sometimes, but more often then not) get an RJS error that reads: TypeError: Cannot set property ''innerHTML'' of bull. I hot
2008 Oct 29
0
RJS problem after upgrading to Rails 2.0.2
I just updated an old app from 1.2.6 to 2.0.2 and I''m having an rjs problem. I have one page that has 2 submit to remote buttons, one to do a price override and the other to remove the lineitem. Everything is working perfectly before the update but now the price override doesn''t update the page. I''ve verified that the price_override method still gets called because
2006 Mar 31
3
RJS templates outputting bloated code?
I''m an RJS newbie. I just did the tutorial at http://www.codyfauser.com/articles/2005/11/20/rails-rjs-templates, and then used wget to look at the output the RJS template generates. This is what I got: try { new Insertion.Bottom("list", "<li>Fox</li>"); new Effect.Highlight("list",{duration:1}); Element.update("header", "RJS
2010 May 24
2
Two RJS visual effects will happen at the same time?
I was going to change the background of a div from white to red and then from red back to white, so this is used in an RJS file: page[:vote_score].visual_effect :highlight, :startcolor => ''#ffffff'', :endcolor => ''#ffcccc'' page[:vote_score].visual_effect :highlight, :startcolor => ''#ffcccc'', :endcolor =>
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
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
2007 Sep 14
0
deal with Controller and Action logic in RJS?
The question is, should we deal with Controller and Action logic in the RJS file? If so, is it quite "spaghetti-like"? This is actually for the Agile Web book Shopping Cart example: If the user clicks "Remove Item" and we do it the AJAX way, what if we want to first show the cart''s content as 0 x Pragmatic Version Control $0.00 and then highlight
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 May 16
7
RJS head scratcher
I''ve been joyfully using RJS in a lot of our work lately, with no issues whatsoever. However, I am porting an application to RJS templates that we''ve had for a while, and having some issues. When I use Firebug to see what is going on, the response comes back like this: try { new Effect.Highlight("gi_error_row",{duration:20}); } catch (e) { alert(''RJS
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
2006 Jul 31
4
RJS to find an element
I''m trying to implement a remove from cart method based on the examples in the second edition Agile book. I have everything working except for the RJS that removes items from the cart. Ideally what I''d like to do is highlight an element that I am deleting only if there is more than one of that particular item in the cart. If the item deleted is the only of
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 =>
2008 Sep 03
2
Highlighint rjs problem on a new product
Hi, Problem Summary: I have been trying to add the highlight effect to my table but everytime a new record is added the highlighting gives an rjs error. However when i click the add to cart button on a product that already exists inside the table, the highlight effect works. Is this because the partial must only have only one <tr></tr> in it and the <table> must be on the other
2006 Aug 08
1
RJS in_place_editor Error
http://pastie.caboo.se/7624 It just renders the JavaScript response as text/html rather than it being quiet. try { new Effect.Highlight("h1",{duration:1}); } catch (e) { alert(''RJS error:\n\n'' + e.toString()); alert(''new Effect.Highlight(\"h1\",{duration:1});''); throw e } I got this effect when i included an :update in a
2006 Mar 14
2
rjs woes
i''ve just installed the RJS plugin per cody''s instructiuons and read through tutorials. I''ve made the necessary changes to my existing code and everything appears to be working, except that the returned javascript is not being evaluated... here''s my setup: i have a checkbox with an onclick event pointing to a javascript function. this javascript function does
2006 May 17
0
RJS referring to window.parent
Hi all, I''ve been doing some work on the Ajax Scaffold (http://www.ajaxscaffold.com/), to make it work with file uploads (more specifically, the file_upload plugin). The first logical step was to get rid of form_remote_tag, since it''s impossible to send files via XMLHTTPRequests (to my best knowledge). So I referred to the iframe hack, similar to the upload progress bar here
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 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 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