similar to: How to call a javascript function from rails view?

Displaying 20 results from an estimated 3000 matches similar to: "How to call a javascript function from rails view?"

2006 Feb 22
5
Rails on lighttpd locks up, freezes, unresponsive every day
I have RoR running on lighttpd on RedHat Linux and every morning that I check the web page it just keeps waiting to refresh it forever, Firefox and IE never times out on any of the pages I try. Has anyone seen that happening to their RoR? I also removed lighttpd completely and just ran webrick but there was no difference. The linux box has a pretty old kernel 2.4.21-4, could that be the
2006 Jun 15
3
how to give a form a name
Using a <%= form_tag ... %>, how do I give a form a name, so that I can reference it with javascript? I sure can''t figure this out from the docs... Thanks, Shelby PS - what I am trying to do is just have the focus in the first form field when the form is loaded. There has to be an easy way to do this, but I can''t figure it out... -------------- next part --------------
2010 Jun 21
4
javascript tabs not working in rails app
This is in application.html.erb: <script type="text/javascript" src="../javascripts/application.js"></script> <script type="text/javascript" src="../javascripts/jquery-1.4.2.js"></script> <div id="content"> <%= yield :tabContent %> </div>
2019 Jul 12
3
RFC: changing variable naming rules in LLVM codebase
Rui Ueyama via llvm-dev <llvm-dev at lists.llvm.org> writes: > - LLVM's `/*foo=*/`-style comment to annotate function arguments need > to be handled automatically to make the tool scalable. So is the > doxygen @parameter. This is a bit of a side note, but in my own work I've more recently tried to move from this style: foo.h int foo(int a, bool doSomething); foo.cpp
2004 Jul 17
3
chan_capi: sending incoming calls to different contexts
Hello, I am using chan_capi and would like * to behave differently depending on the MSN the caller dials. Is there a way to route incoming ISDN calls to different contexts based on the MSN dailled? I have tried something like msn=1234 incomingmsn=1234 context=msn1 msn=4567 incomingmsn=4567 context=msn2 in capi.conf but with no results. Thanks for any hints. -Walter -- Walter Doerr
2006 Jan 29
2
GetText and rjs templates?
hi, is it possible that gettext don''t work with rjs templates? i''ve just tried this simple example blog_controller.rb : class BlogController < ApplicationController def index end def dosomething end end index.rhtml : <html> <head> <%= javascript_include_tag :defaults %> </head> <body> <div id="test">Some text to change
2019 Jul 12
2
RFC: changing variable naming rules in LLVM codebase
David Blaikie <dblaikie at gmail.com> writes: > Why would enums be less elegant than named boolean constants as you've shown here? Casting, mainly. If the parameters were also changed to an enum type that would be fine too, probably better than inline variables even. > http://jlebar.com/2011/12/16/Boolean_parameters_to_API_functions_considered_harmful..html > (at a random
2008 Feb 29
1
Optional data argument for a function
Dear All, I am working on a function that has an optional data argument, just like lm(). If the user sets the data argument equal to some dataframe, then the function should look inside the dataframe for the variables given to other arguments, otherwise the variables should be accessible from what I believe is called the parent frame from which the function was called. I looked at the source code
2018 Aug 09
3
WishList: Remove Generic Arguments
I apologize if this issue has been raised before. I really like object oriented S3 programming. However, there's one feature of object oriented S3 programming that I don't like. Generic functions can have arguments other than dots. Lets say you have an R package with something like: print.myfunction (f, ...) { dosomething (f, ...) } Noting that I use function objects a lot. R CMD
2008 Sep 17
1
Dealing with missing EOL at end of file
Colleagues, I am using R 2.7.2 on all three platforms (OS X; Windows; Linux) and I have encountered the following problem: I use R to issue a system call the execute a command in the OS. For example: system("DOSOMETHING TOSOMEFILE") In most situations, this task completes successfully and control returns to R. However, in rare situations, the target file (TOSOMEFILE) is
2005 May 06
17
FYI: watch out for google's web accelerator - can empty your app of data
Hi All, A co-worker passed this info on to me: http://37signals.com/svn/archives2/google_web_accelerator_hey_not_so_fast_an_alert_for_web_app_designers.php The Skinny: Google has a "Web Accelerator" that pre-caches pages by following url''s. If you have any plain/simple URL''s that don''t take paramaters (like what often happens in rails apps), it will try to
2006 Aug 16
1
How to pass an array to a javascript function.
Hi - I''m having a bit of trouble with my application. I have this view that calls a javascript function "zip_map". I want to pass to it a scalar array "@zip_geo" but I don''t know how to pass an array to a javascript function in rails. This is what the code looks like: THE .rhtml file: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
2013 Sep 24
0
[LLVMdev] LLD: Returning true on success
On Tue, Sep 24, 2013 at 12:33 PM, Rui Ueyama <ruiu at google.com> wrote: > Hi LLD developers, > > I'm about to make a change to invert the return value of Driver::parse() > to return true on success. Currently it returns false on success. > > In many other functions, we return true to indicate success and false to > indicate failure. The inconsistency is confusing,
2006 Feb 08
29
Autocomplete and Firefox
Having problems with the autocomplete on my linux box and firefox. When I use form tags it breaks, without form tags everything works fine. Exact copy of the example provided, but I added form tags.. The initial search and select works but then the box sort of "locks up" and I can''t change it at all, If I do try to type something nothing changes but a second later the whole
2013 Sep 24
5
[LLVMdev] LLD: Returning true on success
Hi LLD developers, I'm about to make a change to invert the return value of Driver::parse() to return true on success. Currently it returns false on success. In many other functions, we return true to indicate success and false to indicate failure. The inconsistency is confusing, and fixing it should improve code readability. -------------- next part -------------- An HTML attachment was
2012 Jul 31
3
Access @resouce in custom type
Is it possible to access @resource variables inside a type? I would like to make some decisions on parameters based on other parameters that may have already been set. For example, --- newparam(:param1) do Puppet.debug "Found drivesperarray parameter" desc "parameter 1" validate do |value| if resource[:otherparam] then #dosomething else
2012 Dec 20
2
Filling Lists or Arrays of variable dimensions
Following problem: Say you have a bunch of parameters and want to produce results for all combinations of those: height<-c("high","low") width<-c("slim","wide") then what i used to do was something like this: l<-list() for(h in height){ l[[h]]<-list() for(w in width){ l[[h]][[w]] <- doSomething() } } Now those parameters aren't
2019 May 26
2
"if" function in pure R?
Hi all, Could anyone refer to me to a good source to learn how to program a simple control-flow construct* in R, or provide me with a simple example? Control-flow constructs are programmed as primitives, but I would like to be able to do that (if possible) in pure R. The general context is that those functions are a mystery to me. The motivating example is that I would like to create a function
2011 Jul 13
14
Using timezone javascript to set Time.zone
I''ve got a javascript that provides me with the timezone for the client. I want to use this to set Time.zone so that all my times stored in the database are displayed in the timezone for the client. So really simplistically var timezone = jstz.determine_timezone().timezone Time.zone = timezone.olson_tz obviously this can''t be done. I''ve taken a look on the web and can
2014 Nov 04
10
[LLVMdev] lifetime.start/end clarification
The LRM (http://llvm.org/docs/LangRef.html#llvm-lifetime-start-intrinsic) essentially states that: - ptr is dead before a call to "lifetime.start size, ptr" - ptr is dead after a call to "lifetime.end size, ptr" This is all good and fine, and the expected use case is that all "lifetime.end size, ptr" markers are matched with a preceding "lifetime.start