similar to: ajax question, not so basic I guess...

Displaying 20 results from an estimated 4000 matches similar to: "ajax question, not so basic I guess..."

2006 Apr 07
3
How to wait for an image to be loaded?
Hi! I''m making a simple gallery, which uses simple javascript for changing ''src'' attrbiute of ''img'' element. How to wait for an image to be downloaded completely before trying to display it and while browser downloads this image display a spinner gif or ''please wait'' message etc.? Something like this:
2006 Feb 14
2
AJAX on page load
Ok, I''m missing something obvious but after some reasonable looking in _The_ Rails book (sorry haven''t gotten the cookbook yet) and these archives I don''t see a solution to my question. Question: What is the cleanest way to load a div via AJAX when the page loads - no user action necessary. I don''t really want to hack in a hidden remote form or link that is
2007 Mar 08
1
map not displayed after Ajax.updater request
In my layout header I inserted the standard helper : GMap.header I built the map in my controller , I build either a standard table or a map and display it in the corresponding partial the map is built without any problem with the icons and markers ( @map is correct...) @map = GMap.new("map_div") ... @map.icon_global_init(GIcon.new(:image =>
2008 May 04
1
Change in the Tcl/Tk loading in R 2.7.0 (under Unix/Mac OS X)?
Hello, Up to R 2.6.2, I used to start Tcl *without Tk* (I need only Tcl for some part of my work, like a socket server written in Tcl only, for instance) with this code under Mac OS X (particularly on this system, because I don't want to start X11 just to use Tcl code, which is required for Tk!): > Sys.unsetenv("DISPLAY") > library(tcltk) I got then the message
2006 Jan 23
2
DRY encoding conversion and onload ajax execution
Hi everybody, my first Rails app is a frontend for customer data pulled from a legacy postgres database. The db is encoded in Latin1, but my pages will be UTF-8. What is the best way of character encoding conversion? I haven''t found any way to have Rails deal with this natively, so I assume I have to take care of this myself, right? Where would I place my conversion code if I want
2006 Jun 16
11
Detecting Body Onload
I have a piece of code that "waits" for body onload. Every 30ms, it tests $(''body''). Seems that isn''t always good enough. I''ve hit situations where the DOM is "partially" loaded somehow. I fixed matters by setting a global flag... <body onload="bodyLoaded=true;"> which provides a better test... of course I could
2009 Jan 21
7
Panning map to a point vs. setCenter
Several map providers have functions to pan to a location, as opposed to the direct setCenter call. Panning animates the move from one point to another. To implement this in mapstraction, I created a panCenter function. I don''t know how to go about committing the change to svn, or who decides whether my naming convention is worthy, but I thought I''d share the function
2011 Jun 23
1
Class not found when search in .onLoad
Hi, I am facing with a strange behaviour of isClass and extends when these are called in .onLoad in both R 2.12.1 and R 2.13.0. This is preventing my package from doing some object initializations at a proper place (i.e. in .onLoad). Suppose one defines two S4 classes in a package, and that one needs to check the inheritance between these two when loading the package (e.g. to validate slots
2006 May 02
5
How to call a javascript function from rails view?
Is there a way to call a javascript function from within a rails view? I can''t use the onLoad javascript method inside the <body> tag because I don''t have control over the body tag, it''s in my header. There are several rss feed reading functions that are in the page and I would like to call those functions while the page is being loaded or once it''s
2011 Oct 15
2
.onLoad failing because could not find function "loadMethod"
Hi, This strange warning happen sometimes when running 'R CMD check': * checking whether the package can be loaded with stated dependencies ... WARNING Error : .onLoad failed in loadNamespace() for ?pkgB?, details: call: length(new("A")) error: could not find function "loadMethod" Error: package/namespace load failed for ?pkgB? Execution halted
2008 May 05
2
[R-SIG-Mac] Starting tcltk without Tk
It turns out that the behavior of starting just Tcl was actually a bug. Apparently the intention was to attempt to start Tk regardless of the DISPLAY variable, because some TclTk implementation such as Aqua Tcl/Tk don't require DISPLAY and thus would not be loaded. Due to a bug (HAVE_AQUA was not included in Rconfig.h before R 2.7.0), though, this was not the case. I'll leave it
2006 Jan 22
3
"onload" event handler inside a div
Hi. I need help on what is essentially putting an "onload" event handler into a div. I am using render :partial and when the partial is loaded, I would like the divs to show using an effect from a library such as scriptaculous or moofx. However, there is no "onload" for a div. I was wondering what alternative methods I should use to achieve this. Thanks! -- Posted via
2006 Mar 28
3
How to set options() when a package without a name space is loaded?
Hi, how do I set options() when loading a package *without* a name space? Is it possible? I though this one was a common question, but I could not find it in the FAQ, in the help nor in the r-help/r-devel archives. Section 1.6.3 on "Load hooks" in "Writing R Extensions" says that this should be done using the .onLoad hook, but that does only apply to packages name spaces,
2004 Oct 16
3
Lazy loading... advices
Hello, I am looking for more information about lazy loading introduced in R 2.0.0. Doing ?lazyLoad I got some and there is a 'see also' section that points to 'makeLazyLoading'... But I cannot reach this page. My problem is: I recompiled a library that uses a lot of functions from other libraries (of course I can give details if needed). I load it in my computer: library(svGUI),
2005 Aug 27
2
Writing R-extensions
G'day all, After reading through "Writing R Extensions", Version 2.1.1 (2005-06-20), I thought the the following points might need clarifications or corrections. (I checked that these comments also hold for "Writing R Extensions", Version 2.2.0.) 1) When I ran "package.skeleton" recently, I noticed that the DESCRIPTION file and an entry `type'. This
2007 Jan 16
2
on.exit called on loading ?
I just found out that an .onLoad() function such as this stylized one (where I just renamed some identifiers) .onLoad <- function(lib, pkg) { require(zoo, quiet=TRUE, warn.conflicts=FALSE) library.dynam("foolib", pkg, lib ) if (.Platform$OS.type != "windows") { initSomeServices() } if (.Platform$OS.type != "windows") {
2005 Nov 21
2
NAMESPACE, S4, and .onLoad
The Writing R Extensions manual instructs developers who use S4 classes and methods in a package with a name space to: There needs to be an .onLoad action to ensure that the methods package is loaded and attached: .onLoad <- function(lib, pkg) require(methods) I'm wondering if listing methods in the Depends field of the package's DESCRIPTION file is sufficient.
2004 Mar 16
2
Documentation on how to put classes and methods in packages with namespace?
Documentation on how to put classes and methods in packages with namespace? How should I define my classes and methods in "dynamicGraph"??? (That is - Can some one point me to the documentation on how to put classes and methods in packages with a namespace? ) Currently it is done by the code below. This gives problems, when a workspace with a "dynmaicGraph" is
2005 Dec 08
1
Loading namespaces
I'm creating a package for my own use that uses some S4 classes but no methods. I have a file called NAMESPACE it contains the line: exportClasses("foo") and at the top of the R file I have setClass("foo", representation(x="numeric") and the line: .onLoad<-function(libname,pkgname) When I run R CMD check I get Syntax error in the only R file. If I
2010 Mar 22
1
Some more help on S4 mechanism
Hello to the list Some days ago, I placed a question on this maling-list and received an answer from Martin that I tried to follow. Unfortunately, I am still puzzled by the next step. I spent the whole Week-end in gathering information from the net. Some of them are almost contridtcory and I lack a good document to help me. So my first question would beL Is there a convenient document which