similar to: Q: periodically_call_remote ( how to make it execute just once? )

Displaying 20 results from an estimated 800 matches similar to: "Q: periodically_call_remote ( how to make it execute just once? )"

2006 Apr 03
4
Layout Question w/ code from vendor library
I am new to Ruby on Rails in general and apologize if this question is trivial and/or has been asked before ( my searches did not turn up any threads ). I am using the cookies function from actionpack which I have located in my vendor/rails/actionpack directory. Using: cookies[:username] and cookies[:password] from within a controller file works just fine, I am able to set and read
2007 Feb 06
2
Pass parameters in periodically_call_remote?
Hi, I am still new to RoR, so please bear with this newbie question. I would like to have the application in view to press result back to the controller when the periodically_call_remote is called. Right now, this is the code in the view: <div id="get_result"></div> <%= periodically_call_remote(:update => ''get_result'',
2006 Jun 30
6
using rjs
Hi I am relatively new to ruby on rails. I want to use this javascript bundle: http://prototype-window.xilinus.com/index.html How would I call those functions in an rjs file? example: win = new Window(''window_id'', {title: "Sample", top:100, left:350}) win.getContent().innerHTML = "<h1>Hello world !!</h1>"; win.setDestroyOnClose();
2006 Jan 18
2
Newbie question about periodically_call_remote
Hi, I''m new to Ruby on Rails (and Ruby itself). So far, I''ve been able to find answers to most of my questions in the docs or mailing lists. One thing I haven''t been able to find the answer to is how to stop a periodically_call_remote call. My first Rails app is going to be a front-end for our Ant-based build system at work. While the build is running,
2006 May 01
2
Can I send a redirect_to() call to a periodically_call_remote() function?...
Hi, I''m using Rails 1.1 and the periodically_call_remote() helper to query the server for the progress of a long running action. I''m using the excellent new RJS partials to send a page.replace_html() to update the status information on the page--which works very well. When the action completes I''m also trying to send a redirect_to() by the same approach--which
2006 Apr 19
9
Initial load time when periodically_call_remote
When I do periodically_call_remote with e.g. :frequency => 30 after initial page load I have to wait 30 seconds until this partial renders first time. Does anybody know how to make ROR to render partial on web page load, and then start periodic calls every 30 seconds? I tried to put <div id=''mydiv''><%= render(:partial, :action=>''myaction'')
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 Jul 15
1
Is there a huge performance difference between using multiple periodically_call_remote functions or one?
My application has multiple things on the interface that need to be updated periodically. Some things every second, others not so much. Some of these things are global, meaning they are on the interface at all times, and some of these things are view specific. So what I figured I would do is add the periodically_call_remote function for the global elements and another one for the view
2006 May 01
1
Can I send a redirect_to() call to a periodically_call_remote() refresh?
Hi, I''m using Rails 1.1 and the periodically_call_remote() helper to query the server for the progress of a long running action. I''m using the excellent new RJS partials to send a page.replace_html() to update the status information on the page--which works very well. When the action completes I''m also trying to send a redirect_to() by the same approach--which
2006 Apr 03
2
Looking for an example ...
... for overriding the default behavior of scaffold''s builtin create and update handlers. Any help would be grealy appreciated! -Andy -- Posted via http://www.ruby-forum.com/.
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 Apr 07
1
How I can stop periodically_call_remote?
I need make progress bar with following function: # Ruby on Rails code <%= periodically_call_remote(:update => ''progress-bar'', :url => { :action => :progress }, :frequency => 0.1 , :complete => "check(request)") %> How I can stop it? If I have this: /* JavaScript code */ function check(request, object) { if (request.responseText ==
2006 Apr 14
11
Whats the best Ajax way to update a textarea''s text?
I am looking for a way to update the text-value within a textarea from an Ajax render call inside of a controller. Is there a way to do this without rendering an the partial containing the textarea? Thanks, Andy -- Posted via http://www.ruby-forum.com/.
2006 Jul 20
5
RJS where to put helper method?
Hi, If I want to have helper method for my rjs, where''s the best place to put it? so for example: --- bla.rjs: page.replace_html ... page.visual_effect ... --- somewhere: (currently I put in application_helper.rb) def replace_with_effect(page) page.replace_html ... page.visual_effect ... end --- bla.rjs: replace_with_effect page and is there a way to define the helper so we
2006 Apr 10
3
form_remote_tag can only have one submit button?
I setup a form_remote_tag with several submit buttons, all of them share the same name ( ''do_action'' ) and their values differ. eg. button1 named do_action with value ACTION1 button2 named do_action with value ACTION2, etc No matter which button I press the value passed is always the one defined for the first of these buttons ( the correct value associated with the pressed
2005 Dec 31
0
Question about periodically_call_remote
I''m not sure how to ask this succinctly, so bear with me. I''m trying to learn how to use periodically_call_remote to update a div. I have a table whose rows have the data I want to display in the div, one at a time, every 10 seconds (let''s say). For simplicity let''s pretend each row just has one column, "description," which is just a text
2006 Jun 10
0
Problem with ''periodically_call_remote''
My ajax-application have folowing behaviour: Just 1 page loaded with 1st request and all other content always loaded into special DIV using ajax when user clicked menuitems. On some "pages" I using ''periodically_call_remote'', but I can''t STOP it! Simple example: View: <div id="view"> <%= link_to_remote ''Stop tracking'',
2006 Apr 03
0
Question: periodically_call_remote ( only run once? )
Is there a way to use periodically_call_remote to run just one time instead of every '':frequency'' seconds? I tried putting the call inside the div container thinking it would be overwritten when the first remote call replaced the div contents but no such luck. I''d basically like to simulate link_to_remote but not require a click and have it performed automatically
2005 Nov 09
0
conditional periodically_call_remote
Is there a way to only run periodically_call_remote when a condition is true? I essentially want the ability to start and stop periodically_call_remote, based on a user initiated action. Thanks, John Cole
2010 Jun 26
0
change parameters to periodically_call_remote
Hi, I have a search box (id=:phrase) on my rails ajax page. I want a periodically call remote poller to update a div whenever the value in that box changes. On the page containing the search box, I have the following: <%= periodically_call_remote(:url => update_query_topics_url, :with => "$(''phrase'').serialize()", :frequency => 1.0)%> I have also