Displaying 20 results from an estimated 4000 matches similar to: "lesson learned: careful with :update in link_to_remote"
2006 Feb 21
2
empty link_to_remote
I am playing around with AJAX pagination, but even a hard-coded
<%= link_to_remote(''1'', :update => ''listing'', :url => {:action =>
''listing'', :page => 1}) %>
produces href="#". Does anybody know why?
-- fxn
2005 Nov 25
0
Using link_to_remote/remote_function outside of a Controller
Hello!
I have a problem that is quite anoying!
In side my Controller it is no problem to use the
link_to_remote/remote_function function to produce html stuff to include
in my .rhtml file. BUT if I want to do this in another object, for
eample if I inside my controller (init_test) want to do like this:
my_dropdown->get_html
in which I want to perform the link_to_remote/remote_function
2006 Mar 04
3
:class in link_to_remote?
Is there a way to set the class of a link in link_to_remote? I tried
adding :class => "this_damn_class" after the :url hash and it didn''t
work.
I went ahead and did it manually using remote_function, i.e.
<a class="this_damn_class" href="#" onclick="<%= remote_function ...,
:url => {...} %>">My Link</a>
--
Posted via
2006 Jul 26
1
lesson learned: script/runner does not abort on failed require
After a fresh installation of an application, some utility scripts
run with script/runner quietly aborted right after their start. No
error message whatsoever, just a new shell prompt. The reason was an
uninstalled dependecy, but that was difficult to determine because
the load failure was not reported:
% ruby script/runner ''require "foobarbaz"''
%
Why
2008 Jul 23
0
Link_to_remote object missing
Hello, I''m in troubles trying to use ''link_to_remote'' on Rails 2.1.
Having this page:
<h4>Editing project</h4>
<% form_for(:project, :url => project_path(@project), :html =>
{ :method => :put }) do |f| %>
<p>
Name <%= f.text_field :name %>
Date <%= calendar_date_select :project, :target_date, :time =>
2006 May 24
7
migrations and SQLite
I read in the instructions of Tracks that "upgrading via the rake
migrate command is quite a bit more tricky currently with SQLite and
SQLite3". Is there any gotcha regarding migrations and SQLite3?
-- fxn
2006 Jan 14
3
link_to_remote where the url contain a javascript variable
Ok, so I am basically trying to use ''link_to_remote'' and pass the value
of a javascript variable as an argument. Something like that:
link_to_remote "my_link",
:update => ''my_div'',
:url => { :action => "my_action", :var =>
''my_var'' }
Basically,
2008 May 24
1
link_to_remote, image_tag, mouseover is this possible?
Hi guys,
I was wondering if you are able to have a link_to_remote, having an
image_tag and the link_to_remote has a mouseover event that updates a
div. Does the image_tag need the mouseover event? I currently have:
<%= link_to_remote(image_tag(@p_image.public_filename(:thumb)), :update
=> "big_pic", :onmouseover => {:action => :color_change, :id =>
@p_image.id})%>
2006 Aug 04
3
<img onclick> vs link_to_remote()
In one of my view , I have an image the user need to click to close a
<div>selections</div> added by an Ajax call.
if I use :
<img src ="/images/icon_closeitem.gif", size="16*16",
border="0",alt="Close Selection", title="Close", onclick="<%=
remote_function(:url => { :controller => ''property'',
2007 Mar 09
0
link_to_remote with onmouseover event
Anyone have a better method for having the onmouseover event (or any
other mouse event) instead of onclick when using link_to_remote:
This is what I did, but I''d i have to create one for every mouse
event, can''t figure out how to call a mouse event via an argument .
anyone else run into this problem. Thanks
def link_to_remote_mover(name, options = {}, html_options
2006 Feb 19
4
is "display" a reserved name of some sort?
A view display.rhtml sees no controller state variables set in the
corresponding display action. Why?
-- fxn
2006 Mar 19
4
elemental race conditions question
What''s the standard way to prevent race conditions in controllers?
Say user has many posts.
Post controller has action add_post that receives user id, post
controller find()s the user and while he is creating the post entry
an administrator deletes that user in a separate session. We cannot
assume the database checks foreign key integrity. How do you get that
right?
-- fxn
2006 Apr 05
5
when is model() needed?
I have just some vague and thus probably wrong ideas about when to
use model() in controllers, and by now I err on being redundant. I
don''t post them here to avoid leaving anything that may be false in
the archives.
Can anyone explain exactly in which cases one should use model()?
-- fxn
2006 Feb 11
5
after_(read|find) callback?
I am pondering the possibility of encrypting/decrypting some fields
in a SQLite backend on-the-fly.
The point of the message is not security, I know that''s broken, but
whether there''s a technique that provides on-the-fly save/read
filters. Of course the solution would need to work transparently in
joins, so
user.posts.last.title
would do the right thing if title
2006 Jun 01
1
link_to_remote show then hide
Hi,
I have a link_to_remote and it update a div.
After the first click the div is opened with the information.
Now I want to be able to close hide the div .
How should I do it.
Someone at the IRC told me to use toggle.
But what I want is a bit odd. I want that it will not do again
link_to_remote but toggle.
Tnx
Kfir
2005 Dec 24
2
Ajax Help: Multiple Updates - ?
Hi!
Wondering if anyone can tell me what''s wrong with my code?
I''m trying to use the onChange event of a select list to update multiple
divs...
Agile Web Development with Rails (p. 403) suggests using ":complete =>
eval(request.responseText) instead of :update"
I''ve attempted the following test code:
# in the view
<select name="plist",
2006 Jan 04
6
Ajax makes me cry
What is the difference in treatment between an ajax link_to_remote and a
form_remote_tag
This works great and adds a list item to an ordered list with
id=form_results
link_to_remote ("Help me please!",
:update => ''form_results'',
:url => { :action => :search_ajax_test },
:position =>
2006 Feb 15
1
where to set $KCODE
My application uses only UTF-8. Which is the canonical place to do
something global like setting $KCODE?
-- fxn
2006 Feb 19
1
distributing iconv.dll
I would like to distribute Iconv for Windows with my Rails
application (developing on a Mac, no experience with dlls). I threw
iconv.dll and charset.dll under lib without luck. Where would I need
to put them (if this is possible at all)?
-- fxn
PS: The reported error message is in Spanish but translated reads
something like "the specified process was not found: Init_iconv".
2006 Apr 10
4
has render_component changed?
I have an application that worked fine, but after the recent updates
has broken in some calls to render_component from views. I might be
missing something but as far as I remember Rails updates is the only
thing I''ve done in between. See the log:
*** START LOG SNIPPET
Start rendering component ({:params=>
{:center_id=>10, :id=>25},