similar to: .rjs templates undesiered output problem

Displaying 20 results from an estimated 100 matches similar to: ".rjs templates undesiered output problem"

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 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 Aug 18
3
RJS templates for DOM manipulation
I want to do some DOM manipulation with JavaScript. Specifically I want to implement zoom in/out in a picture by changing it''s width/height attributes. Is it possible to do this using RJS or should I write javascript by hand? All the examples of RJS I''ve seen write the javascript in the result of an AJAX remote call. Where are the docs for RJS? All I''ve seen are blog
2006 Dec 05
5
Render :update and script tags
Hi All! I''m kind of new o ruby so please apologize my stupid questions on advanced... I''m using render :update do |page| page.replaca_html :element , :partial => ''apartial'' end This is working well, since I see in the page the following code: try { Element.update("element", ""); } catch (e) { alert(''RJS
2010 Mar 11
2
divid the rows of the matrix by the cector
Hi, I have a matrix with m rows and n column and a vector with n elements. I want to divid each rows of the matrix by vector direcly. could you please hint me? Thank you khazaei
2006 Jul 24
2
BIG JS limit? Using replace_html with partials containing JS
Hello, It''s pretty hard giving a practical example on this one. I have a partial which contains some generated Javascript. Something like: order_screen.rhtml ------------------------------------------- <h1>Order</h1> <div id="order_part"> <%=render :partial=>''order_new'' %> </div> <h1>Ordered products</h1>
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 18
4
update_page yields escaped code in callback
Hi All, The subject pretty well describes what I am experiencing. This line in an .rhtml template: <%= link_to_remote menu_item.humanize, {:update => ''section'', :url =>{:controller => menu_item}, :complete => update_page do |page| page.activate_tab("#{menu_item}_tab", ''menu_'') page[''section''].hide
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
2006 Aug 14
2
ajax - layout problem.
Hi guys Here is my problem... Using Ajax to update a div with link_to_remote. Problem is I have a layout defined in my class, so, the div gets the layout when I call the method, how di I tell a method to ingore the layout? Cheers. Pieter. -------------- next part -------------- An HTML attachment was scrubbed... URL:
2010 Sep 15
5
Hide an image in show.html.erb
I have the following "show.html.erb" script, and I get as an output TWO images since I use a method to draw an image. How can I HIDE the RESOURCE image? Thanks. Here is the script: <canvas id="line" height="512" width="512"> </canvas> <p id="notice"><%= notice %></p> <p> <b> Name </b> <%=
2004 Aug 06
2
Winamp icecast streaming broken?
Hi, I have a few problems with Winamp 2.8. (I can't use or recommend Winamp3 because of all the various problems I've had with it. It seems that Ogg streaming is broken on ports other than port 80. However, streaming in general seems not to work correctly. If I point the winamp client at an icecast or gnump3d server, it locates the file or stream fine, buffers a bit, and starts
2008 Dec 13
2
What is "The Rails Way" to do this?
I have a PHP application with the following in one of the "views": <input type="button" onClick="newAlt()" value=" + "></nobr> The JavaScript for "newAlt()" is: // using DOM create new input box for alternate part function newAlt() { var html = "<input style=''background-color:#FFFFCC'' "; html +=
2018 Nov 07
2
Avoiding constant HDD access
On Wed, Nov 07, 2018 at 08:54:11AM +0000, Rowland Penny via samba wrote: > On Wed, 7 Nov 2018 05:45:45 +0300 > Albert Berger via samba <samba at lists.samba.org> wrote: > > > I'm running a Samba server on Raspbian and observing that Samba > > during idle periods is constantly (every minute) writing to HDD > > (maybe doing some journaling?) what causes the HDD
2006 Apr 20
4
JavaScriptGenerator Dead End
Hi All, I posted earlier about a problem I was having with the various remote view methods escaping all the javascript in my callbacks. I was quickly informed that that''s just what they do, and offered some workarounds. However, in actually working with this, I''m finding that this one little thing is forcing me to write some REALLY ugly code. Where I thought I could
2006 Jul 14
4
Help with link_to_remote or javascript generator
Hi all, I''m a relative noob to rails so I apologize in advance for asking such a basic question. I am trying to do multiple AJAX calls using the link_to_remote helper or the JavaScript generator update_page. I have googled and read the docs for both, but can''t seem to figure out exactly what i need to do. Say I have the following html: <div
2006 Jan 30
5
a RJS problem/patch
Hi, add_rjs_to_action_view.rb of javascript_generator_templates doesn''t work with setting Content-Type in a controller. (e.g.) http://wiki.rubyonrails.org/rails/pages/HowtoSetDefaultEncoding class ApplicationController < ActionController::Base before_filter :set_charset def set_charset @headers["Content-Type"] = "text/html; charset=utf-8" end end I
2007 Dec 20
3
How-to spec this helper method?...
Hey gang, I have this dead-simple method defined in a helper: def add_category_link(name) link_to_function name do |page| page.insert_html :bottom, :categories, :partial => ''category'', :object => Category.new end end Where, and mostly how, would I spec this? I haven''t been able to find how to stub the rjs in a helper spec, so
2006 Apr 05
7
Conditional toggle button
I have a link_to_remote that updates the content of a hidden div and makes it appear.. But I want it to hide the div and not execute the link_to_remote function on the second click. What''s the best way to do this? I''m thinking I can do it in RJS maybe, but I''m not sure if there''s a nice Rails-y way to tell if a div is hidden or not.. I''d also
2006 Apr 25
1
asynchronous False and Ajax.Responders object (bug)
Hi all. In my apps I''m using Ajax Call synchronous, (both Ajax Request and Ajax Updater). There is bug in prototype (discused in mailing - list: here http://wrath.rubyonrails.org/pipermail/rails-spinoffs/2006-April/003488.html and here http://wrath.rubyonrails.org/pipermail/rails-spinoffs/2006-April/003497.html). trying to put data from server to my html properly, I need call