Displaying 20 results from an estimated 2000 matches similar to: "Refresh a partial onClick using ajax call in rails 3.x"
2013 Mar 11
8
Access instance variable in ajax rendered by controller - Rails
I am making an ajax call to my controller. Controller is sending in the
response in an instance variable(as a json object). How can I access the
same in my ajax javascript?
This is my ajax call code:
$(document).ready(function(){
var currentCellText;
$(".inline").click(function() {
currentCellText = $(this).text();
$.ajax({
type: ''GET'',
dataType: "json",
2006 Apr 29
4
Event.observe mystery
Hi,
I have a class ''Menu'' with a method ''addItem''. The method (simplified)
looks like this:
addItem: function(itemId, text)
{
this.container.innerHTML += ''<div id="''+itemId+''">''+text+''</div>'';
Event.observe(itemId, ''mouseover'',
2012 Nov 23
1
Adding a function with default parameters into the Rcmdr menu
Hi everyone,
I made some tests with Rcmdr, to add a function with default parameters :
For example (very simple):
myfunction<-function(var="314"){
print("hello")
print(var)
}
if I run myfunction() directly i see :
> myfunction()
[1] "hello"
[1] "314"
it's ok.
But if i edit de Rcmdr-menu.txt (in
2008 Jan 18
1
Noob question for wxMenu.get_menu_items()
How do I iterate through the pseudo-template list class containing
wxMenuItem pointers.
Am still a bit of a Ruby/wxRuby noob.
Currently have this:
pp mymenu.get_menu_items()
which prints:
#<SWIG::TYPE_p_wxMenuItemList:0x4634fa8>
However when I try to do:
mymenu.get_menu_items().each {|key| ...} it tells me there is no each
method for this class (SWIG::TYPE_p_wxMenuItemList)
2006 Jul 18
5
Right-click popup menu?
Hi,
I have a partial frame on the side of a page which shows the current
users logged in (as text). Now, I would like to be able to right-click
on each user''s name, and get a menu containing links such as "View
Profile", "Send Message", etc. These links could open in a new window.
Is this possible? Any help would be greatly appreciated.
Thanks,
Aditya Rajgarhia
2008 Jun 15
11
[PATCH] helper to create fb css stylized table
I attached a rails helper implementation of the fb_table described here:
http://wiki.developers.facebook.com/index.php/Facebook_Styles
I included testing and comments. I hope you find it useful.
Curiously, it''s really a small extension of FBML.
Richard
-------------- next part --------------
Index: test/rails_integration_test.rb
2008 Feb 29
1
GETSCRIPT Bug in dovecot-1.0.10-MANAGESIEVE-v9.1.diff.gz
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello Stephan,
GETSCRIPT does not return a literal, there is the + character missing
before }:
diff -r bcebda39c0ed src/managesieve/cmd-getscript.c
- --- a/src/managesieve/cmd-getscript.c Mon Feb 18 14:13:12 2008 +0100
+++ b/src/managesieve/cmd-getscript.c Fri Feb 29 11:52:00 2008 +0100
@@ -112,7 +112,7 @@
return
2006 Jan 22
6
*Very* basic layout question
I''m trying to use a different layout for just one action in my
controller, all the other actions use the application.rhtml layout, so
what i''m doing is ...
class SomeController < ApplicationController
layout "simple", :only=> :some_action
......
end
and the "simple" layout is applied to all the actions, can someone
please give me a hint?
2006 Apr 10
1
routing
I have this in my routes.rb:
...
map.connect ":action/:id", :controller => "default_controller"
..
It worked nicely, until I added a second controller to my project. The
new (second) controller is "Admin".
The problem is I cant reach the actions in the second controller.
http://mysite.com/some_action is routed to some_action in
default_controller. That is
2011 Sep 10
4
Finding HTML attributes with jQuery in Rails 3.1
I''m having trouble wrapping my head around the proper syntax to have
jQuery (in an .js file) grab an HTML attribute and use the value of
that attribute to load a partial.
HTML fragment:
<a href="/toggle" data-remote="true" section="training">
jQuery string (now setting a static partial, I need this to be
dynamic)
2010 Sep 21
7
Ajax CSRF in Rails3
I''m using rails3. It does not seem to check the authenticity_token
when doing a POST using Ajax. I traced this to:
module ActionDispatch
class Request < Rack::Request
.....
def forgery_whitelisted?
get? || xhr? || content_mime_type.nil? || !
content_mime_type.verify_request?
end
end
so you don''t check if its a get? or a xhr? (ie ajax request). Is this
correct?
--
2004 Apr 27
6
SYSLINUX 2.09, 2.10-pre1 released
Hi all,
I have released SYSLINUX 2.09; it is the same as 2.09-pre15 except for
the version number.
Changes in 2.09:
* SYSLINUX: Remove residual setuid crap from
syslinux-nomtools.
* Handle video pages correctly when using the API functions.
* Handle compiling on an x86-64 platform correctly.
* Menu system from Murali Krishnan Ganapathy; see the
2010 Dec 21
8
Rails - escape_javascript without all the \n\n\n\n\n
Hello, I''m using escape_javascript to return a partial to the browser
via ajax.
Something like:
$("#inject").html("<%=escape_javascript(render :partial =>"feed/
index")%>");
Problem is escape_javascript ends up outputing all kinds of wasted
space like
\n\n\n\n\n \n
Is there anyway in Rails to escape_javascript more
2011 Feb 17
1
managesieve bug: UTF inside quoted-string
This has been probably fixed in meantime, because I use dovecot 1.1
still, but I'd like to get you to know. Use of UTF-8 characters inside
quoted-string doesn't work.
C: GETSCRIPT "???w"
S NO "Error in MANAGESIEVE command GETSCRIPT: String contains invalid
character."
--
Aleksander 'A.L.E.C' Machniak
LAN Management System Developer [http://lms.org.pl]
2011 Jun 15
5
rails 3.0.9
Today was expected the new stable rails release 3.0.9 with some fixed,
among all the problem with escape_javascript.
It seems that it see that has not been released, unfortunately.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to
2015 Jan 08
9
[LLVMdev] Separating loop nests based on profile information?
I've been playing with approaches to getting better optimization of
loops which contain infrequently executed slow paths. I've gotten as
far as throwing together a proof of concept implementation of a profile
guided optimization to separate a single loop with multiple latches into
a loop nest, but I want to get feedback from interested parties before
investing much more effort.
The
2008 Apr 07
2
A little assistance with Sieve
With all the mess that my email has become, it makes sense for me to try
to make use of Sieve, but I'm having quite the time finding out how to
make it work. I'm running 1.0.13 on a Debian machine. Sieve appears to
be compiled with it. I can access managesieve, and I have set up
dovecot.conf with lda. I do not get a NO response when I PUTSCRIPI, but
LISTSCRIPTS produces no result, so I
2007 Nov 07
1
draggable with iframeshim for ie6
you all know the problem with select and textbox in ie6 where you need
an iframe under your divs so they will visually be on top. does
scriptaculous have api for iframeshim like yahoo yui does?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group.
To post to this group, send
2012 Feb 29
4
how to use link_to with :remote=>true in rails 3.2.1
I m using Rails 3.2.1. how to use link_to with remote=>true
--------------------------------------------
My Method in Controller
def clickme
@clk = "you click me"
respond_to do |format|
format.js { render :layout=>false }
end
end
--------------------------------------------
My View
In my new.html.erb file
<%= link_to "click here",
2008 Jan 03
0
Wx::Menu, get parent menu functions?
I have been looking in the API Docs for get_parent type stuff for the
Menu''s - so I can track a click path across sub-menus and have not found
anything. Are there really no functions for that or did I just miss the
right place to look?
If it is true then consider this below:
class MyMenu < Wx::Menu
def initialize(mymasterclass, name = nil, id = -1, parent_menu = nil,
title =