Displaying 20 results from an estimated 100 matches similar to: "Multiple ajax calls"
2006 Apr 28
4
.times not behaving as I''d expect
I''m using prototype 1.4.0 in a big web application I''ve been working
on for months and today a bug was raised by one of our testers. After
investigation it turns out that something done 0 times will actually
fire once. So, for example, if I had
(0).times( function(i) { alert(i); } );
it''d fire once rather than not at all. Is this a bug in prototype or
the
2006 Jun 19
10
Trying to delete from a unordered list using ajax
I have a controller method as such:
def delete
@category = Category.find_by_name(params[:name])
@element_id = @category.name
Category.delete_all(["name = ?", @category.name])
end
(For the purpose of this exercise, category names are unique)
I have the corresponding delete.rjs file:
if @element_id
page.remove :id => @element_id
page.visual_effect :highlight,
2006 Jun 19
2
Partials from a master layout?
Hi
I am using a ''master'' layout in my project by putting "layout ''main''" in
my application controller so that the same layout is applied to every
controller and I would like to use partials in the layout file (obeying
DRY, of course!) but if I render a partial in the layout then whenever
the layout is rendered by a controller the layout looks for
2019 Aug 23
3
Vectorization fails when dealing with a lot of for loops.
Hello, could you please have a look at this code posted on godbolt.org:
https://godbolt.org/z/O-O-Q7
The problem is that inside the compute function, only the first loop vectorizes while the rest copies of it don't. But if I remove any of the for loops, then the rest vectorize successfully. Could you please confirm that this is a bug, otherwise give me more insight on why the vectorization
2006 May 10
12
What to do with HUGE instance variables in Rails?
I''m learning rails and I can succesfully use the following things in the
controller:
@var1 = Var.find :all
@var2 = Var2.find :all
Problem is that the DB has about 260,000 lines which considerably slows
everything down if I load everything in @var1.
Isn''t there a way to load those items progressively? I treat them
separately (e.g. no interactions between them) in the program so
2006 May 24
2
newbie oo question
Hey everyone,
I''m trying to create an object that will have some properties
predefined, but will allow me to pass in properties to override those
standard props if needed. I''m trying something like:
var myObject = Class.create();
myObject.prototype = {
initialize: function(element, options) {
this.element = $(element);
this.name = this.element.id;
this.options =
2009 Feb 11
1
Ruby on Rails: Talk | Google Groups
This is more an architectural question....
I am looking to create a domain that sells widgets (as an example)
widgets.com
Now I have three sales reps, that each sell different kinds of
widgets, and do not need to know about each other.
larry.widget.com
moe.widget.com
curley.widget.com
I don''t want to repeat myself (of course!) with the shopping cart
logic or the transactional
2006 Jun 27
5
Ajax - Inserting selected elements from request.responseText
After retrieving a URL using an Ajax.Request...
function onComplete (request, json) {
// request.responseText holds the entire page
Only the content contained in elementID = ''source'' is intended for display
At this time, the following code works, but it disturbingly copies the
entire page from the source URL into the target DIV
$(''target'').innerHTML =
2006 Jan 24
1
Liquid templates and RJS
Does anybody know whether Liquid templates can be combined with RJS ?
--
Roberto Saccon - http://rsaccon.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060124/edeafadc/attachment.html
2005 Jul 12
11
how to cancel/stop a script.aculo.us effect
I apologise for what is probably a totally noob question here, but I''m at a
loss after pouring over the docs and the source code for prototype and
scriptaculous...
After you''ve started an effect, how do you access it to cancel or change it?
I had assumed it was something like this:
myEffect = new Effect.Appear(element, {duration:1.5});
myEffect.cancel();
... but that
2023 Mar 01
1
Inherit Owner / Permissions
A user is attempting to use Windows Powershell get-childitem command to
copy files from one SMB directory to another.
*****************
Get-ChildItem -Path "W:\z_TestFiles\source1" -Recurse -File |
ForEach-Object {
Copy-Item -Path $_.FullName -Destination "X:\dest1"
}
*****************
When the command is run it creates the files as 0 byte files and then
errors.
2009 Apr 03
1
bigglm "update" with ff
Hi, since bigglm doesn't have update, I was wondering how to achieve
something like (similar to the example in ff package manual using biglm):
first <- TRUE
ffrowapply ({
if (first) {
first <- FALSE
fit <- bigglm(eqn, as.data.frame(bigdata[i1:i2,,drop=FALSE]), chunksize =
10000, family = binomial())
} else {
fit <- update(fit,
2006 Jun 14
5
Sortable Tree - Stoping Event dispatch ?
Hi,
I''m trying to play with sortable tree and have two issues:
I have an AJAX Tree looking like:
<ul class=''TreeCat'' id=''work''>
<li class=''open''>
<img src=''s.gif'' class=''node'' onclick="Ajax.Tree.toggle(event,this);"/>
<a
2017 Sep 28
1
[PATCH net-next RFC 5/5] vhost_net: basic tx virtqueue batched processing
> @@ -461,6 +460,7 @@ static void handle_tx(struct vhost_net *net)
> struct socket *sock;
> struct vhost_net_ubuf_ref *uninitialized_var(ubufs);
> bool zcopy, zcopy_used;
> + int i, batched = VHOST_NET_BATCH;
>
> mutex_lock(&vq->mutex);
> sock = vq->private_data;
> @@ -475,6 +475,12 @@ static void handle_tx(struct
2017 Sep 28
1
[PATCH net-next RFC 5/5] vhost_net: basic tx virtqueue batched processing
> @@ -461,6 +460,7 @@ static void handle_tx(struct vhost_net *net)
> struct socket *sock;
> struct vhost_net_ubuf_ref *uninitialized_var(ubufs);
> bool zcopy, zcopy_used;
> + int i, batched = VHOST_NET_BATCH;
>
> mutex_lock(&vq->mutex);
> sock = vq->private_data;
> @@ -475,6 +475,12 @@ static void handle_tx(struct
2006 Apr 10
1
RE: Prototype Ajax - How to pass my own params toonComplete ?
You need a closure.
onComplete: function (response) { NamedActionResponseHandler(theElement,
response); }
Is that what you mean?
Greg
> -----Original Message-----
> From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
[mailto:rails-spinoffs-
> bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Erin Brewer
> Sent: Monday, April 10, 2006
2006 Jul 10
1
Migration and foreign keys
Hi,
I''m using the ''rake db_schema_dump'' command to clone the structure of
the developement database into the test database.
Unfortunatelly, the schema.rb file doesn''t contain any information about
the foreign keys of the tables. For this reason all the test that
concern about the relations are not working has suposed.
Is this a limitation of Rails or am I
2005 Aug 22
2
Dragging out of an ''overflow: auto'' container
Hey all,
Is there a solution for dragging an item out of a scrollable container?
It seems to just scroll the container for me. Sorry if this is in the
FAQ, the site''s been unreachable for me since last night.
Thanks
-Scott
2005 Dec 29
2
options_for_select order
I''m trying to create a Select box
using the following code:
<%= select ''project'', ''status'', { "Active" => "Active", "MD"
=> "MD", "HOLD" => "HOLD", "Dead" => "Dead" } %>
You''d think the select box would keep them in
2011 Feb 15
7
Hide/Show Div and link_to_remote
Hi
I want to show some info and provided an ''edit'' button next to it.
This will change the display info to an editable form.
I''ve seen this done before, but what I can''t figure out is whether I
have to use an actual remote action to the rails server?
I think I should be able to render both the edit box and the display
info as seperate divs, and then show/hide