similar to: RJS templates for DOM manipulation

Displaying 20 results from an estimated 4000 matches similar to: "RJS templates for DOM manipulation"

2008 Mar 17
9
Render index view and RJS on load?
Hi, I''ve searched for a while online and been unable to find anything concerning this. I have a controller with an index action, which has an index view. This view renders the index page but also needs to execute some javascript to show some data (using effects) when the page loads. I thought I could just create the view and RJS with the same name and the RJS would be run after the
2006 Aug 18
1
controller is to app.rb ; view is to layout folder ; rjs template is to ??
any help with this analogy? i have an rjs template that goes along with a method i have in application.rb and the functionality will be used from many diff controllers (the method take a tag as param to accomplish some AJAX acrobatics).. just trying to stay DRY here. is there no other way other than sticking the same rjs template in each view folder that uses this functionality? i guess i could do
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 Apr 17
2
Building Dynamic DOM Element IDs for RJS Templates
My element IDs are constructed using the object id. So . . . <div id="foo<%= foo.id %>" > <p><%= link_to_remote "Do Foo", :url =>{:action => "do", :id => foo.id} %> </div> How do, and can I, build that id in the RJS template? Also, can anyone recommend a good Ruby syntax book that would help me out with Rails? I know
2006 Apr 22
0
RJS question - Query DOM/CSS from RJS?
I understand that I wouldn''t be able to directly query into the DOM/CSS of a page from within an RJS file because it runs on the server but is there any way to populate a variable from the controller or something to gain access to DOM information? What I want to do is this: I have some RJS to blind_down an error message panel, but if the form is resubmitted and there are still errors,
2006 May 13
2
Using RJS in views without ajax
Hi! I can use RJS in views like this (without using ajax): <%=link_to_function("switch fields", update_page do |page| page.insert_html :before, ''date'', date_select(''exhibition'', ''date'') page.remove ''date'' end) %> Is there a way to move this RJS code into a function to separate file? .js files are not parsed
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 May 12
0
RJS, Safari, Error - DOM exception 7
I''m having nasty cross-browser headache. Not new to Rails, but quite new to AJAX/RJS. My app works perfectly in Firefox, but generates the error in the subject line in Safari. Pretty simple circumstance, completely reproducible in all cases: Any ideas? Relevant code attached. Layout: ------- <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC
2006 Mar 27
7
rjs template ? (how to check for existence of a dom element?
In my rjs template I''m using the following line. page.visual_effect :slideUp, ''comment_error_details'', :duration => 0.5 It works fine if I have created the div with the id="comment_error_details", but if I haven''t created the error yet then my whole rjs template fails. How can I check to see if an element has been created? I could then put
2009 Aug 07
2
calling a jQuery function from RJS/onclick
Hi, I have the following jQuery function on the head of my page. <script type="text/javascript"> jQuery.noConflict(); /* calling jNice on document ready */ jQuery(document).ready(function($) { $(''div.jNice'').jNice(); }); ..... </script> On page load, this gets called correctly. Now there''s a link on the page that lets me add more
2008 Mar 19
6
Back button behavior has changed again in Safari 3.1, after doing a dom update via ajax/RJS
GAH! Here is the firefox behavior, which is perfect: 1) View page 1 2) Update some text by using link_to_remote or remote_form_for, along with an RJS replace or replace_html 3) Navigate to page 2 4) Hit back 5) Page was cached with dom updates, note that the page is show in the same state as it was left Safari 3.0 behavior 1..4) repeat 5) Page reloads, ending up in the state where it was left
2006 Jun 06
0
Get value from form using rjs, and problem with Safari
Hi, I have got two forms, the first is a textarea plus a link that activates some javascript to change the form, the second activates some javascript on the onchange event which changes it into a textarea form. This works in Firefox, but not in Safari. Also, I need the value which is selected. I''ve found an example that gives the parameter to the javascript, like this: <input
2009 Mar 07
0
RJS: pass javascript variables in ruby calls
Hey, I have this link_to_function which takes an RJS block as follows: page.insert_html :bottom, :documents, :partial => "upload_fields", :locals => { :doc => Document.new, :index => ''UNIQUE_ID'' } It adds a partial to a div. I need index to be a unique id, but can''t generate one. I have an actual javascript function next_index() that will
2007 Oct 26
2
Appending to a textarea with RJS
Ok, this is driving me nuts. I''m trying to RJS some text into a text_area which may or may not have been written in by the user. if I page.insert_html :before, :after, :top, or :bottom, it either sticks the contents above or below the text box (but never in). If I do: page[:textboxid].value = "blah" it overwrites the contents of the textbox but doesn''t APPEND to it.
2006 Aug 17
4
Unit Tests and lib/
Hi *, I have a few modules in lib/ and I use them mostly in my models. I''d like to add a few unit tests and run them with rake with all other tests of my app: where do I have to write them ? TIA, ngw -- Nicholas Wieland nicholas_wieland@yahoo.it -------------- next part -------------- An HTML attachment was scrubbed... URL:
2015 Mar 16
2
[LLVMdev] Question: Motivation of the semantics of the undefined value?
Dear LLVMdev, We have a question regarding the semantics of the undefined value in LLVM IR. As far as we understand, in order to give a semantics to the undefined value, the semantics of LLVM IR is generalized to a rather unusual set-based semantics. More specifically, the notion of value in LLVM IR is generalized to a set of values, rather than a single value. Then the undefined value is simply
2006 May 04
1
Ajas Scaffolding and RJS Templates the same thing?
Hey all, I''m just starting in rails and am working on my first app. I need to do inline editing for 2-15 rows of data on a page. I found Ajax Scaffolding here: http://www.ajaxscaffold.com/ And it is EXACTLY what I want in my app. But I''ve also been trying to read a bit up on RJS Templates. Are they basically the same things except RJS is built into rails or is the
2006 Feb 18
2
Effect queues with RJS templates and scriptaculous
Hi. I was wondering if it''s possible to combine effects for individual elements with RJS templates. I notice that scriptaculous has support for a concept called effect queues (http://www.railsdevelopment.com/2006/01/15/effectqueue/). Is there anyway to use these queues from rjs?
2006 Jan 24
1
Liquid templates and RJS
Does anybody know whether Liquid templates can be combined with RJS ? -- Roberto Saccon - http://rsaccon.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060124/edeafadc/attachment.html
2005 Dec 19
1
Question about rjs templates
Hi everyone I read some support about rjs templates at http://www.codyfauser.com/articles/2005/11/20/rails-rjs-templates but when i download the rails1.0, i could not find the code in http://dev.rubyonrails.org/changeset/3078 ,and i also could not find the file actionpack/test/fixtures/test/delete_with_js.rjs is something wrong with me.thanks for your answers. -- Posted via