Displaying 20 results from an estimated 4000 matches similar to: "Change Button Text - Ajax"
2010 Mar 22
7
How to reference a select_tag within a form
Hi All,
Inside my app\views\expenses\new.html.erb file, I had the code:
<% form_for(@expense) do |f| %>
[snip]
<p>
<%= f.label :vendor %><br />
<%= f.text_field :vendor %>
<br />
<div id="vendor_droplist>
<%= select_tag "test",
options_for_select(@current_vendors.collect { |v|
v.nickname }),
{:multiple
2013 Oct 27
5
run simple method from Helper on button click
Greetings,
I''m new to rails and currently having couple problems about how to add
javascript functionality into rails.
I have a simple method in the helper and i want to run this code on
button click.
------------------------------------------------------------------
module PagesHelper
def show_message
"simple output"
end
end
2010 Oct 20
2
How do i use button_to_function
Hii all ,
I am trying to create a button that, when clicked on, calls a
method in a controller . I am thinking that button_to_function is good
to use for that i made htnl viwe like
<h1>File Upload</h1>
<p><label for="upload_file">Select File</label> :
<%= file_field ''upload'', ''datafile'' %></p>
2009 Dec 06
3
link_to_function or button_to_function memory usage
I have an full ajax app doing crud operations for contact info for one
section. I was using ajax calls to edit and cancel and also to add a
contact. I am implementing a button_to_function instead of doing an
ajax call to just edit/add/or cancel a contact. I am running into a
memory issue using the button_to_function or link_to_function.
I have this:
<%= link_to_function ''Edit
2005 Jan 06
2
autoscaling plot font size in Sweave output possible?
Hi,
I was wondering if it's possible to have fonts in plots to be
autoscaled to the same font size used by LaTeX in a surrounding
Sweave document.
Here's a short example in which the fonts of the first plot are
barely readable:
--8<------------------------schnipp------------------------->8---
\documentclass{article}
\usepackage{graphicx}
\newcommand{\mytext}{Some normal sized
2005 Nov 30
1
\dQuote{} in \code{} not processed
Just wondering if this is the expected behaviour.
I was wanting to produce quoted text within \code{}, without manually
entering the '"'. \dQuote{} seems advisable after reading the Writing R
Extensions manual, so I tried \code{\dQuote{mytext}} expecting it to
produce "mytext" in monospace font (with ' ' round it in the R help
files) but it appears that
2007 Dec 04
2
button_to_function question
Hey everybody,
I am trying to create a button that, when clicked on, calls a method
in a controller then changes the image on the button without a page
load. I was thinking that button_to_function might be a good
contender for this but I don''t yet know how to make it talk to a
controller, and on success change the image of the button. Can anyone
help me out with this problem?
Thanks,
2006 Jul 21
10
Using an image button for "link_to_remote"
All,
I want to do an AJAX request using a custom image button. I currently
have this as a standard button action using "button_to".
What I need is the button equivalent of "link_to_remote". Is there a
helper that I can use, or do I need to build it by hand?
I see button_to_function(), but that sets me up to call a Javascript
function, not post to a Rails action.
Or can
2018 Sep 28
4
Simple bash question
I am calling a bash script and passing in somestring that includes a "$"
myscript "$plusmore"
I want to assign in the myscript the $1 arg to something like
MYTEXT="$1"
when I do that I dont get what I'm expecting. if I do
MYTEXT='$1'
I still dont get what I'm expecting.
On the first assignment of MYTEXT I do not want the "$" to be
2009 Apr 24
2
passing a value to a js function via button_to_function
I''ve got a table of what I call resources, want to show in a jQuery
dialog a particular record when user clicks button in a row.
in the table I''m doing:
<td><%=button_to_function ''Show'',''showresource1()'',:class =>"ui-button
ui-state-default ui-corner-all", :id => resource.id %></td>
js:
<script
2019 Feb 13
3
Problem writing to ADS with cifs mounted windows share on Linux
Hi,
We are facing difficulties writing to Alternate Data Streams (ADS) on a
Windows CIFS mount on CentOS/RHEL Linux.
Steps followed on both machine:
--------------------------------------------
On RHEL(cifs.ko version: 1.68)
1. Created sample.txt file using vim with come content inside the
Windows CIFS share mounted on linux.
2. Then wrote some content with “vim
2012 Dec 12
2
long margin text below lattice plot - how to wrap lines?
Hello,
I've got a lattice plot and need to add text into the bottom margin of the plotting area (below the bottom legend).
This seems to work in principle using grid.arrange, yet the text to be added is rather long. As a consequence, it gets clipped:
require(lattice)
require(grid)
myplot <- xyplot(1~1)
mytext <- textGrob("This is such a very very long text that it goes on forever
2007 May 19
4
button_to_function with image?
Hi:
does button_to_function allow the use of an image? I tried it in place
of the text with "image_tag" and it doesn''t work. Maybe some form of
button_to?
Any direction you can give would be great!
Mike
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
2011 Aug 25
2
string manipulation
I R-users,
I am trying to find the way to manipulate a character string to select a 4 digit number after some specific word/s. Example:
mytext <- "I do not want the first number 1234, but the second number 5678"
Is there any function that allows you to select a certain number of digits (in this case 5678) after a particular word/s (e.g., second number)
Thank you for your help
2017 Mar 14
2
[cfe-dev] proposal - pragma section directive in clang
Thanks Reid/Jonathon for your replies.
Reid,
An important case against module level flags is that it wont allow changing or resetting section names e.g.
int a;
#pragma clang section bss = "xyz"
int b;
In case above, users would like to see only 'b' placed in 'xyz' and not 'a' as well.
Link pointed to by Jonathon seems to require same behavior.
2006 Jun 16
2
image_select_tag with name and value
What have I missed
I have a .rhtml with the sandard form parameters
<%= image_submit_tag("excel.gif", :alt => "Download List to Excel",
:border => 0, :name => ''render_action'', :value => ''excel'' ) %>
Which genenerates I believe a valid html fragment for a submit button.
<input alt="Download List to Excel"
2011 Aug 04
3
#create tests fail when I add FriendlyId to my model
I am doing controller testing, and I can''t seem to get the create
method test to pass when friendly_id is added to the mix. If I comment
it out of the model, the tests all pass perfectly. The moment I add it
back in, the error looks like this:
1) Error:
test_create_valid(BrandsControllerTest):
FriendlyId::BlankError: FriendlyId::BlankError
2004 Aug 06
1
Lattice: how to index in a custom panel function?
Hi,
I have a lattice xyplot that contains panels according to FactorA, and
curves for the 2 levels of Factor B within a panel.
I try to add text in the panels of a lattice graph. I suppose I have to
write a custom function (panel.txt).
What I really would like is to adapt the text in the panel according to
the levels of FactorA.
In the manuals, I find examples for the strips using which.given
2006 Jun 06
2
Toggle css for display on page load?
In my layout I have a navigation bar with a few elements in it. The
elements can be toggled on or off and thereby reveal or conceal some
subtopics. I store the state of the toggle for the navigation elements
in the session.
When the page is reloaded, the navigation items are collapsed because
the css for display: none is set by default in the html for the
navigation elements. Is there a
2013 Mar 14
3
Error: did not find expected key while parsing a block mapping
I run test:
test:units
lass ProductTest < ActiveSupport::TestCase
test "product attributes not be empty" do
product = Product.new
assert product.invalid?
assert product.errors[:title].any?
assert product.errors[:description].any?
assert product.errors[:price].any?
assert product.errors[:image_url].any?
end
test "price musst be