similar to: rjs template ? (how to check for existence of a dom element?

Displaying 20 results from an estimated 1000 matches similar to: "rjs template ? (how to check for existence of a dom element?"

2008 Nov 22
3
RJS page.update question
How does page.update actually work? I know its a wrapper for Prototype.update but how does it get the partial in there? Say I wanted to update a div with the contents of a partial manually like this. content = render(:partial => ''whatever'') page.call "$(''my_div'').update(#{content})" But his does not work. It keeps giving me weird errors about
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 Mar 15
4
Ruby - Feed Generators
Hi All, Can anyone help me in making feed[xml/rss] generator for a webpage based on ruby/ruby on rails. Tell me if any ruby code is already available, to generate feeds for a webpage. Thanks in Advance. Sumanth. -- Posted via http://www.ruby-forum.com/.
2006 Mar 29
3
Bash
I have installed Ruby and Rails on my Intel iMac according to the instructions provided by Hivelogic. Everything works perfectly. I have noticed that if I close Terminal and later come back and open it, It seems like the paths set in bash_login are lost. If I open bash_login the paths are still there however if i do ruby -v it says I am running 1.8.2 (mac default) when I have installed 1.8.4.
2006 Jun 02
1
Ajax: update multiple DIV''s
Hello. Is it possible to update multiple DIVs during? For example I have DIV for @flash[:notice], and one for content and I need to render both DIVs after executing action.
2007 Aug 20
3
Contribution on extending createElement
Hi all, I work a lot with scripts that modify the DOM, and I have always found quite annoying that the code would always get very verbose as soon as I wanted to create even simple structures : var my_div = document.createElement(''div''); var my_anchor = document.createElement(''a''); my_anchor.setAttribute(''href'',my_link); var my_text =
2006 Mar 16
8
Question on gems on Mac OSX
Hi all, lately I''ve been working with ROR on a MAC OSX tiger at work, however I have one huge problem with seems to be the root of all my problems whenever I use terminal or iTerm to start workign with ROR. Every single time I open a new terminal window or close one and open a new one, I have to reapply my path from .bash_login for Ruby and MySql, and than I have to install the
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 Mar 14
5
GROUP BY and SUM
I have orders, order_items, and products. I want to collate several orders so that I can get a SUM of quantities ordered for each product etc. Can I say something like (the below gives an error on :sum, and ignores :group) OrderItem.find(:all, :sum => ''quantity'', :group => ''product_id'', :include => [:order, :product]) I want to get back a
2005 Dec 03
1
SlideDown/SlideUp question
Hi , i jotted down this script here http://awstagingserver.net/snehal/ajax/prototype/rssget/news.asp# its a RSS reader thing , what i am trying to achieve here is save browser space here by using SlideDown and SlideUp , as you might see whats happening with the script when you click on the newsbar name , what i want is when initially WorldNews is displayed and when you click on Slashdot ,it
2005 Sep 13
6
flicker in IE with SlideDown/SlideUp
The flicker I am seeing in IE is really really bad with SlideDown/SlideUp. The element I am sliding is a div that contains a table. The tables are stacked on top of each other so that the presentation actually appears as a single table. When I SlideDown, the toggled element flashed into view then disappears before sliding down. On SlideUp it slides up then flashes into view for a split
2005 Oct 10
3
Scrollable DIV causes flicker in FF - SlideDown & SlideUp
I have a fixed height scrollable div inside another div that controls the slideDown and slideUp effects. This causes a really bad flicker in Firefox (1.0.7) for the entire duration of the slide down and up. While on the other hand it works smoothly in IE (except that on a slideUp it causes a last second flash that shows the entire div). Any ideas on how I can fix this? Thanks.
2006 Feb 06
10
Urgently Need Solution
I''m using scriptaculous'' SlideUp and SlideDown effects to animate a menu. Specifically, I SlideUp, make some CSS changes, and SlideDown. All works well, except that for a split second in between, the element''s display becomes ''none'' and the other menu item jump into the space. I haven''t been able to find any way to force an element to retain
2005 Sep 18
3
Attaching effects during onload
I''m trying to attach effects to elements in my onload handler and my lack of Javascript-fu is showing... I want to call the effect from the onclick handler of an anchor inside the div I want the effect to apply to. Here''s what I''m trying to do: function doOnLoad() { var filters = document.getElementsByName(''filter''); for
2006 Mar 27
4
widgets on rails?
Here''s my crazy question of the day. Has anybody played around with using Rails to create Mac OS X Dashboard Widgets? Or is that just sick and wrong? Giles
2006 Jan 14
3
link_to_remote where the url contain a javascript variable
Ok, so I am basically trying to use ''link_to_remote'' and pass the value of a javascript variable as an argument. Something like that: link_to_remote "my_link", :update => ''my_div'', :url => { :action => "my_action", :var => ''my_var'' } Basically,
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 Mar 18
1
Need help .. Rails Recipes, in_place_editor, selecting associations
Hi, I am currently reading the Rails Recipes book and like the chapter on providing your own in_place_editor for enumerations / selects. I understood so far, or I believe that I understood ;-), how to do that for a field that uses values only, like choosing from "red", "black", "green". What I fail to understand is how to chose from associated objects?!
2006 Apr 09
4
Set Speed of Combinational Effects
How can I slow/speed up the combo effects? Thanks
2006 Jul 10
17
Effect.SlideDown/Up() and HTML issues
Hello, I''m hoping this is the right place to ask these kind of questions. If not, please excuse me. Anyway, the problem I''m having is that I have a HTML table showing some tabular data and I want to use Effect.SlideDown/Up to allow the user to interactively show "details" for each item (<tr><td> etc) in that list. I''ll do some pseudo-code for