similar to: Ajax, getting Data from the Database every 5 seconds

Displaying 20 results from an estimated 10000 matches similar to: "Ajax, getting Data from the Database every 5 seconds"

2006 May 13
5
Ajax Checkbox using Rails
Hi, I''m trying to have a checkbox, that when clickes sends an update to the server and in turn modify the UI with feedback on the success of the operation. The main difficulty I''m encountering is that I can''t pass the checkbox value if I use the standard PrototypeHelpers. I''m using remote_function to build the function call, but it doesn''t allow
2006 Jul 01
6
Sorting by an attribute on a associated table
So, I have a User has_many :profiles. The most recently dated profile is considered the current one. I need to sort these users by name, but the name attribute is a member of the associated table. Is there any easy way to do this other than with some ugly find_by_sql? Maybe a more general question - is there a common solution to sorting in Ruby? -- Posted via http://www.ruby-forum.com/.
2006 Jul 21
1
Passing a variable between methods
Hi, I am trying to add search functionality to may application. I am struggeling to pass my query to the controller and then show all my search results in another view. How would I do this? Model: class Advert < ActiveRecord::Base belongs_to :user def self.search(query) if !query.to_s.strip.empty? tokens = query.split.collect {|c| "%#{c.downcase}%"}
2006 Jun 23
5
Ajax zooming pictures
Hi, I was wondering if anyone has an idea of the code that I can write to achieve the follow effect. http://www.istockphoto.com/file_search.php?action=file&userID=938503 When you move your mouse over an image, it shows a bigger picture. Thanks -- Posted via http://www.ruby-forum.com/.
2006 Jul 07
2
Ajax "Waiting..." flash while round-tripping
I''m trying to figure out how to best allow a user to click a link_to_remote (or something like it) that will make the clicked thing disappear and replace it with a "Saving..." or "Please wait..." image until the server round-trip is complete. Once complete, it needs to replace the HTML in that span or div with text from the server. I imagine it will involve
2006 May 10
2
Redirect whole page from AJAX action that updates a div
Hi, I am calling an action via AJAX to update a div. The action needs to redirect the page in under certain circumstances. However, if I just use "redirect_to" in the action then of course what happens is that the page I want to redirect to replaces only the div, not the entire page, and I get messy nested layouts. Is there a way around this? Can I redirect the entire document from
2006 Feb 16
4
newbie question regarding basic AJAX form verification
Hi, I''m confused about how form verification with AJAX works. Let''s say I have a ''new.rhtml'' view that contains a form with two fields, and the form action is ''create''. Let''s assume that I also want to do some type of data validation on one of the two fields via AJAX before I submit the form. But since I''ve already
2006 Jun 28
2
Assign CSS class to Link to Remote
I''m trying to get link_to_remote to assign a CSS class to the link it generates. My code is as follows: <%= link_to_remote "Show Full Info", :update => "fullcontact" + reparray.last.to_s, :url => "/cm/full_contact/" + reparray.last.to_s, :classname => "contactlink" %> Which produces this HTML: <a href="#"
2007 Mar 20
2
Progressive AJAX Filter
Hi Guys, In my rails app, I present a table of data that I want to be able to filter using multiple criteria. I''ve created a one-line table of input fields above my table to accept filter criteria like this... <%= javascript_include_tag :defaults %> &nbsp; <form name="sform" action="" style="display:inline;"
2009 Jul 29
6
Doubt in nil object with ajax
hi this is my htnl <html> <head> <%= javascript_include_tag :defaults %> </head> <body> <%= form_tag nil, { :id => ''search_form'' } %> <%= text_field ''recipe'', ''name'' %> <%= end_form_tag %> <div id="recipe"> </div> <%= observe_form :search_form, :frequency =>
2008 Apr 10
2
Ajax Request Caching by Timestamp?
Hi everyone, first post here in the forum. I''m usually in #rubyonrails on freenode. I''ve been thinking about the various types of caching, and I was wondering if its possible to have the server selectively send back data, instead sending nothing ''0'' if user has the newest data. My example is a presence monitor, and it seems like the logic is: - Rails caches
2010 Mar 09
9
Ajax-submit form on "check box onclick ": why this error?
Hi there, I need to have a checkbox which ajax-submits a form. The following code throws an error "index 112009 out of string". What''s wrong here? ============================================== <% form_remote_tag :url => { whatever_url } do -%> <%= check_box_tag ''whatever'', nil, whatever, { :onclick =>
2006 Mar 26
4
Updating query results in real time with AJAX
I have the following view template: <%= form_remote_tag :update => "new_item", :url => {:action => ''create''}, :before => %(Element.show(''spinner'')), :success => %(Element.hide(''spinner'')) %> <div id="new_item"> </div>
2007 Nov 15
4
Using .find_by_sql for database/admin queries
I want to create an internal admin view to display the output of "show variables" from mysql. What''s the best approach do this? For example, I''m doing something like this: @variables = ActiveRecord::Base.find_by_sql "show variables;" Then, I get stuff like this back (227 elements in @variables) in script/console: >> @variables[0] =>
2006 Feb 17
3
Ajax On Rails
Hi, I want database query in rail for ''LIKE'' i.e in sql it something like. "SELECT * FROM tablename where filedname LIKE ''%keyword%'' " etc. What for rail? -- Posted via http://www.ruby-forum.com/.
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.
2006 Apr 14
2
Nested AJAX remote_form in form?
I''d like to achieve something that is better described by the following code: <%= start_form_tag :action => ''create'' %> <%= text_area ''place'', ''description'', :cols => 100, :rows => 4 %> <div id="categories"> <%= form_remote_tag :update => ''categories'',
2005 Dec 05
2
is it possible to use R to edit an EXCEL spreadsheet so I can create a searchable EXCEL database of R packages?
I have copied the R FAQ pertaining to available packages into an EXCEL file. They take the following form - Design Regression modeling, testing, estimation, validation, graphics, prediction, and typesetting by storing enhanced model design attributes in the fit. Design is a etc. Devore5 Data sets and sample analyses from "Probability and Statistics for Engineering and the Sciences (5th
2006 Aug 16
6
error with edge rails
I''ve started an app with rails 1.1.6 then ran freeze_edge. My app will not run with rails in the vendor folder. Have I forgot to do something? I"ve been without the internet for the last two months. Has something changed?
2006 Aug 02
1
Ad-hoc database queries from models
Hi, I''m looking at how to do ad-hoc database queries from RoR models - more specifically I have built an app which tracks issues which uses its own nice clean database containing only issues that I care about. I would like to be able to (optionally) populate an issue from a few big, slow, unwieldly backend databases and want to know the best way to do it. It looks like doing