Displaying 20 results from an estimated 1000 matches similar to: "Whats the best Ajax way to update a textarea''s text?"
2006 Apr 07
3
RJS removing content of div, but not div itself
Hi,
I''m creating a list of ingredients on a page. When the user clicks the ''Add Ingredient'' button a record gets added to the db and the ingredient gets added to the page. On the page, each record is represented by a <div> with three <span>s inside. One of the <span>s has a link_to_remote to ''delete'' the ingredient. When the link
2006 Apr 10
3
form_remote_tag : additional onsubmit funct. possible ?
Is there a way to add onsubmit functionality to a form_remote_tag with
an additional javascript directive?
eg I''d like for an inline javascript to make the form''s div container
hidden as soon as the button is pressed to avoid having it possibly get
pressed again ( sometimes the rails response is slow enough for a user
to think they need to re-press it ).
example:
<div
2006 Apr 03
4
Layout Question w/ code from vendor library
I am new to Ruby on Rails in general and apologize if this question is
trivial and/or has been asked before ( my searches did not turn up any
threads ).
I am using the cookies function from actionpack which I have located in
my vendor/rails/actionpack directory.
Using:
cookies[:username] and cookies[:password]
from within a controller file works just fine, I am able to set and read
2006 Apr 03
2
Looking for an example ...
... for overriding the default behavior of scaffold''s builtin create
and update handlers.
Any help would be grealy appreciated!
-Andy
--
Posted via http://www.ruby-forum.com/.
2006 Apr 20
0
Clearing text_field_tag -- Help PLEASE
I''m trying to clear the input fields on an Ajax form. Unfortunately, I''ve tried this just about every way I can
think of and instead of clearing the fields, it''s clearing pretty much the whole page. I would ***really*** appreciate some help!
The page has a form that allows the entry of two fields. The form exists inside a <div> with id=entry. When the user
2006 Apr 10
3
form_remote_tag can only have one submit button?
I setup a form_remote_tag with several submit buttons, all of them share
the same name
( ''do_action'' ) and their values differ.
eg.
button1 named do_action with value ACTION1
button2 named do_action with value ACTION2,
etc
No matter which button I press the value passed is always the one
defined for the first of these buttons ( the correct value associated
with the pressed
2006 Apr 03
1
Q: periodically_call_remote ( how to make it execute just once? )
I posted this ealier on the web forums but noticed a similar question
about this function and one user responded to try this list instead. If
anyone can help I would greatly appreciate your suggestions.
Q:
Is there a way to use periodically_call_remote to run just one time
instead of every '':frequency'' seconds?
I tried putting the call inside the div container thinking it
2006 Apr 24
9
Confusion with expressing many to many relationship
Hi folks, I am in the process of converting an existing non-rails
application to rails, and am not sure what the best approach would be
for specifying the relationship between the two sets of data.
I''ll describe the existing table structures first.
Table 1: Urls
Each url has a unique id and two lists of Phrases, these are currently
setup as varchars with "," delimitation -
2007 Apr 13
2
inplace editor and textarea
Hi,
I have an inplace editor and I can access the innerHTML value of the
created form. However the innerHTML gives "<textarea>....</textarea>
..."
How can I access the textarea value? I tried to do
innerHTML.textarea.value but it didn''t work. Any ideas will be
appreciated.
Thanks,
Joe
--
Posted via http://www.ruby-forum.com/.
2007 Jun 22
5
assert_select trying to verify the presence of a textarea
Hello,
One of my functional tests looks like this:
def test_presence_of_free_text
profile = Profile.find :first
post :edit, {:id => profile.id}
assert_select "textarea", :name => "record[free_text_ec]"
end
The test results in a failure, because the element cannot be found.
I''m pretty sure the element should be there, and I''ve tried
2007 Aug 25
2
insert HTML <select> value into a textarea - Works in IE6, not in FireFox or Opera
I have a simple form at http://mstramba.com/fb5.html
It''s just a <select> and a textarea.
The idea is to be able to either type into a text area directly or
choose from a list of saved words in the select box. When a new choice
is made from the select, it automatically gets inserted into the text
area.
This code DOES work in I.E6 (on my machine (XP pro), but doesn''t
2010 Mar 11
4
Call a controller method from a view
Hi,
I am trying to call a controller method from my view, but I get an error
and I don''t know how to correct it.
What i am trying to do:
I am in the edit form of the model Product, and products can have many
ingredients. So on my edit form there is a text_field where you type the
ingredient with a link "Add" which is supposed to add the typed
ingredient to the current
2006 Jun 05
1
formatting inside a <textarea>
I tried to put formatted text out to the browser when it was inside a textarea and got to
look at markup. This might just be an HTML question. Is there a construct that will let
me bound the size of text display with rows and cols like <textarea> but also let me
html-format the internal text? I suppose I could hack up a table to use percentages.
Maybe there is a CSS solution where I
2007 Nov 19
3
wxRuby textArea??
I want to know wxruby can make textArea like java??
I can only use textbox with it but it has problem when I must use text
that has many line, it can''t new line
please help me
--
Posted via http://www.ruby-forum.com/.
2006 Jan 05
6
InPlaceEditor and textarea
Hi to all.
First of all exchuse for my bad english
I try to use Ajax.InPlaceEditor with a textarea:
##################
new Ajax.InPlaceEditor($(''ipblock''), ''tools/admin_save.php'',
{ ajaxOptions: {method: ''get''},
rows:10,
cols:20,
callback: function(form, value) { return ''op=ipblock&value='' + value},
2007 Nov 06
5
textarea fails on rows attribute
Hi,
Camping 1.5.180
Ruby 1.8.6
It looks like Camping is choking on the ''rows'' attribute for input tags:
input(:name => ''cuid'', :type => ''text'', :size => 10, :rows => 3)
That will fail with:
Markaby::InvalidXhtmlError no attribute `rows'' on input elements:
2006 Jan 17
4
textarea problem with accentued chars
Hello, I have a problem with accentued characters return from a textarea
I have 3 simple files to show example ( below ).
index.rhml : If I put "?nial" inside the textarea, then submit to
:action => post
post.rhml : wrote
?nial
195
"\303\251nial"
//
params[:comment][:message] return => ?nial
params[:comment][:message][1] return => 195 ! ( 195 is not
2006 Mar 09
2
How to keep formatting of text in textarea?
Hi!
I''ve got a form for creating news and i''d like to keep formatting of the
text in the textarea - if user presses enter twice, or presses space ten
times it should be visible when editing or showing the news.
Probably i should add before_save filter and some regexps for adding
html tags, but i know almost nothing about regexp. Maybe there''s a
simpler way also.
2009 Nov 05
1
tabIndex not working for select or textarea in form_for
Hello all,
Maybe this is something easy to solve but I can set all my text_field
tabIndex by { :tabIndex => ''2''}. When I try to do the same for the
select or the textarea it doesn''t work. Is there something I''m missing?
Thank you.
John
--
Posted via http://www.ruby-forum.com/.
2006 Apr 28
9
Q: Timing of render :update in an action ?
Hey folks, am hoping someone can set me straight with a solution to an
issue that has come up involving the timing of rendered page elements in
relation to the completion of an action''s execution.
I have an ror search app which searches through two tables consisting of
7,000 page urls and a table w/ 87,000 related keyphrases within those
pages. Search results can take anywhere from 2