similar to: replace_html + javascript

Displaying 20 results from an estimated 4000 matches similar to: "replace_html + javascript"

2006 Mar 18
9
RJS - not working in IE
I searched thru all the postings about RJS, and I didn''t find one person who complained of problems specific to IE, but that''s what I''ve got. My environment is: Rails 1.0 + RJS Plugin Updated Javascripts to Scriptaculous 1.5.3 (for evalScripts support) Monkeypatched in_place_editor to support evalScripts I have just started using RJS, and I have two .rjs templates.
2006 Mar 22
1
RJS - Still not working in IE
The previous thread on this topic got a little disjointed, so I thought I''d summarize the issue again, in hopes that someone could help. To re-iterate, this rjs works in Firefox and Safari on Mac, and in Firefox on Windows. It fails, in IE on Windows. The failure is that the second page.replace_html seems to do nothing. My environment is: Rails 1.0 + RJS Plugin Updated
2006 May 25
2
page.replace_html
This is odd. When I call: page.replace_html ''formdiv'', :partial => ''listing'' from an rjs file it renders stuff like: \n \n \n test \n \n test , NY 12344 \n \n Phone: (999)999-8888 \n\t\t\n\n \n \t\n \t\thttp:// \n \t\n \n \n \n"); } catch (e) { alert(''RJS error:\n\n'' + e.toString());
2007 May 11
2
spec a replace_html with a partial
I wanted to use ARTS to add RJS in a behaviour driven way to my application, but I''m having some trouble asserting a replace_html with a partial. I''ve created a pastie (http://pastie.caboo.se/60694) which contains the RJS I want to spec, the spec which I already wrote and its failure message. I''m currently using RSpec-0.9.2
2006 Apr 19
4
RJS replace_html auto-closing tags
I''m using the following RJS template to spit out a div containing a list of projects: page.replace_html ''results'', ''<div>'' @projects.each do |p| page.insert_html :bottom, ''results'', p.name + "<br/>" end page.insert_html :bottom, ''searchresults'', ''</div>'' page.show
2006 Apr 07
2
Re: Re: page.replace_html "#{var_containing_id_name}", :partial
> you mean like this? > > def do_some_ajax_thing > <at> element_id = "content_div" > end > > do_some_ajax_thing.rjs > > page.replace_html <at> element_id, :partial => "edit" > > remember, the view templates have access to the attributes defined > in the controller Actually, its more like this: I have a list page. Each row
2006 Apr 07
2
Re: page.replace_html "#{var_containing_id_name}", :partial
Jeff Coleman <progressions@...> writes: > > Jason Tuttle wrote: > > The subject line says it all. -- Is there a way to do something like: > > > > page.replace_html "#{var_containing_id_name}", :partial => ''edit'' > > > > That line of code does not work, but I would like to pass the name of > > a variable to
2006 Aug 07
1
Unable to page.replace_html from rjs
I am having problems updating a div defined in a partial using both Element.update and page.replace_html in an rjs. I can put a link_to_remote in the partial using an :update, and the div updates fine. Does anyone have any idea why this might be happening? In the partial: <div><div> . . <div id="question_<%=question.id%>_error"></div> . (if a
2006 Jul 28
5
RoR & Lightbox
Has anybody else had a problem with using Lightbox in their RoR apps? I include all the necessary files in application.rhtml and then attempt to use the Lightbox functionality in pages and such. Nothing happens except that a new page opens up with the link to the image I was attempting to show with Lightbox. I''ve even gone so far as to strip out everything except the necessary
2006 May 29
3
IFRAME based RJS - responds_to_parent
** File uploads with AJAX mojo ** Respond with RJS to your parent window with a form action targeted to a hidden IFRAME. Handles all the painful situations like scoping your JavaScript to your parent window generating the script block for execution and clearing the IFRAME after execution so the back button doesn''t re-execute the action. `plugin install
2006 Apr 07
2
page.replace_html "#{var_containing_id_name}", :partial => ''edit''
The subject line says it all. -- Is there a way to do something like: page.replace_html "#{var_containing_id_name}", :partial => ''edit'' That line of code does not work, but I would like to pass the name of a variable to page.replace_html. This variable would contain the id of the div I want to update. Anyone know if/how I could do that? Thanks! : ) Jason
2006 May 08
1
replace_html on a select fails on IE and Opera
I am using an rjs file to do a page.replace_html on a select field as follows: @inrhtml = options_from_collection_for_select( @widgets, "id", "name") page.replace_html "type_select", @inrhtml I have it working on firefox and safari but it doesn''t work on IE and opera? My javascript defaults are up-to-date. I would appreciate any help. thx, -hkn --
2008 Feb 29
0
RJS and EXTjs component update (RAILS 1.2.3)
I want to use an RJS view to update EXT Panel bodies. But since the panel bodies have generated element ids, I can''t see how to use ''page.replace_html''. So instead I wrote a javascript function ''updateBody''. In the RJS view, I want to say something like: page.call ''updateBody'', ''some_panel'', :partial =>
2008 Mar 12
2
RJS replace_html for all divs with a class
Hi- I want to do a bunch of html_replace ''s for a class of divs, not one single div and I want to replace the content with a partial. I can round them up using page.select, but cannot find something that will easily let me do something like: page.select(div.user).each do |d| d.replace_html render partial => y partial end Any ideas? Thanks, Dino
2008 Aug 24
11
link_to_function check javascript attribute
How could I check the value of an javascript object''s attribute? <div id="new_item_details" style="display:none"></div> <%= link_to_function("Show details...", nil, :id => "show_details") do |page| page.visual_effect(:toggle_blind, :new_item_details) if (page[:new_item_details].style.visibility ==
2006 Jul 03
2
rjs renders string or partial but not template or action
Hi, I have an rjs file. I only have one controller called called front. I have views called "new_title.rhtml" and "_new_title.rhtml" These work page.replace_html ''title'', ''new title'' page.replace_html ''title'', :partial => ''new_title'' page.replace_html ''title'',
2006 May 08
17
partial problem
def my_controller @variable = [{''myfield''=>''grey''},{''myfield''=>''blue''}] end #-------------------------my_view <table> <%= render :partial=>''my_partial, :collection=>@variable %> </table> #----------------------_my_partial <tr> <td><%=
2006 May 25
5
Is there a way to abstract the updating of other parts of the page after an Ajax request without putting using the standard view file?
Hey all, I''d like to abstract the process of updating different portions of the page after an Ajax request has taken place. Rather than simply putting the extra view logic in the standard rjs template, it seems to give better separation if there is a split between the core view logic (ie, inserting a row in a table), and updating any associated portions of the page. Is this possible? I
2006 Apr 05
23
how to create RJS visual effects callbacks
I''m trying desperately to get visuall effects callbacks working in rjs templates to no avail What I''m trying to do is fade an image, change the div with the image to a new image, and then fade the new image back in. How would I go about this in RJS Here''s a simple line from my rjs that I can''t get to work. It is not using callbacks so the
2006 Mar 07
12
rjs and partials
I''m trying to update a list, and having a hard time applying visual effects to the latest element created. Here is what I''m doing. =========================================== 1) Creating an "item" via an action, then rendering the RJS template 2) RJS template looks like this: page.insert_html :top, ''items'', :partial =>