similar to: RJS replaces JavaScript?

Displaying 20 results from an estimated 5000 matches similar to: "RJS replaces JavaScript?"

2006 Nov 04
6
Javascript form validation for In place editting in scriptaculous ?
Is there a way by which I can do form validation for form generated by In Place Editting of scritaculous? The reason is, I want to avoid server roundtrip for checks which I can perform at browser. Regards, Jatinder -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060828/ca882668/attachment-0001.html
2006 Apr 25
8
Does Rails suppports XHTML for views for inline SVG''s?
I have following piece of code(which when saved in a file with .xhtml extension and opened in Mozilla 1.5.0.2 works fine); <html xmlns="http://www.w3.org/1999/xhtml" xmlns:svg="http://www.w3.org/2000/svg"> <head> <title>SVG within XHTML Demo</title> </head> <body> <p> You can embed SVG into XHTML, provided that your
2006 Apr 23
3
RJS not sent as text/javascript
I''ve made a couple of other posts about this and finally figured out what was wrong. For some reason, the RJS response was not being sent with a content type of "text/javascript" (which it should be, per the dox). The following line in each controller method that renders RJS makes my app work: @headers[''Content-Type''] = ''text/javascript''
2006 Apr 06
4
Using RJS to call custom JavaScript class/method
The announcement for RoR 1.1 shows some nice examples of RJS calls. In particular I am interested in this one: # Call the custom JavaScript class/method AddressBook.cancel() page.address_book.cancel In trying to develop a "lightbox" style modal form, I have been successful in saving the form data via AJAX but I can''t seem to close the "lightbox". I am using the
2006 Sep 06
2
RJS Javascript oddity - trying to call Element.setStyle
Hi all, I have a really simple web page. Right now, it''s just a button and a square div. What I want to do is to change the background color of the div to red when the button is clicked. My form code looks like this: <%= form_remote_tag :url => {:action => ''color_show''} %> color_show.rjs looks like this: page <<
2006 Mar 28
5
RJS call from controller issues javascript that doesn''t get evaluated by browser
Hi, I''m on Rails 1.1 and I have a problem wit RJS In my cotroller i have ==>>> def show @contact = Contact.find(params[:id]) render :update do |page| page[:contactInfo].replace_html :partial=>"contactInfo" end end <<<=== And my contactInfo partial looks like this and it''s placed inside a div element ==>>> <table>
2008 Mar 24
2
render not able to locate template in publisher
Hi guys, I have a publisher called UserPublisher setup in models directory of my app. The reason I have it in a model is because its then possible for me to invoke publisher methods in after_callbacks of my other models, just the way we do it for ActionMailer. My problem is that when I try to update a users profile specifying location of the view template as a paramater to "profile"
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
2006 Apr 22
3
rjs woes, any hints?
I''ve pared my rjs experiment down to what seems a bare minimum. When I click on my link_to_remote, the rjs executes, returns the correct javascript to the browser, but it doesn''t update the div I''ve specified. What appears to be coming back from the controller is: Element.update("my_form", "hello, rjs"); I''m tearing my hair out.
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 =>
2005 Dec 19
1
Preserving fallback with RJS
Hi guys, I really like RJS. I think they''ll replace partials in alot of instances. Unfortunately, because they''re automatically used like .rhtml and .rxml and are hard to specifically specify it makes it messy to preserve fallbacks when using them. For instance, using partials instead of rjs, my create method might look like: def create post = Post.new(params[:post]) ...
2005 Dec 28
1
RJS and :loading
Hi, I''m a newbie with Ajax and RJS and have one basic question. When contents in .rjs are exceuted in a Ajax sequence? .rjs seems a kind of alternate for .rhtml view file, so I guess they are in action after the controller action completed. The contents of .rjs file are :complete scenario, right? if so, can''t I write some on :loading action in .rjs? like disabling
2006 Jan 13
1
Rendering an RJS template within another RJS template
Is there a way to render an RJS template within another? I''ve put my simplified code below. No errors are generated, but the partial isn''t rendered. I also tried using render :action => ''update_actions'' destroy.rjs--- page.visual_effect :fade, comment_container(@object.id.to_s) # update the number of comments(below is another rjs template) render :partial
2006 Jun 13
5
strange RJS behavior
I used RJS extensively in my last web app with no problem. I''m just beginning a new one and having a very odd problem. The called method, get_names, retrieves some values from the database, then ends: render :layout => false the get_names.rjs file is rendered into Javascript, but then is just dumped as Javascript (text) into the browser: e.g: try {
2006 Feb 08
3
Using shared RJS templates
I''ve got an action in my application controller that needs to call a shared RJS template. Typically it''s actually being called by subclasses of the application controller. I''ve tried this.. def action ...code.. render :partial => "shared/template" end with ''_template.rjs'' existing in the shared folder. The problem that crops
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 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 Apr 01
2
Inline RJS in controller
Inline RJS and Controller Hi guys, I really like the idea about inline RJS. I have about 20 rjs files for this 1 controller. They are small. Just updating and hiding some div''s. So to move this into my controller would clean up a lot. It makes sense because you see in the controller what you do. Question: 1. Any penalties for doing this? - size of controller increases - performance
2009 Jul 12
3
RJS render errors when user clicks away before render completes
We have an issue where we are using RJS templates to render the results of Ajax calls. Everything works fine so long as the user waits for the render to occur. However, if the user initiates the request and the RJS template is still in the process of rendering, but hasn''t completed, and the user clicks a different link, then we get a Javascript alert popup "Unexpected Server
2006 Jul 08
1
Ajax, RJS, and Standard Form Errors
Hi all, I''m trying to take the standard scaffold and add a bit for ajax to it. I have a two column page with the list on the left and the right side is reserved for the create/edit actions. On a successful save my rjs executes and updates the list view on the left and returns the right side to a "home" page. However, if one of the model validations fail I use rjs ro