Displaying 20 results from an estimated 6000 matches similar to: "Hide/Show Div and link_to_remote"
2006 Apr 26
8
Newbie: Hide div I''ve just show using link_to_remote?
I''m using link_to_remote to show details for an item that''s clicked. I''d
like to hide the div with the next click, or alternatively have a "Hide"
link within my div.
What is the best way to accomplish this?
Here''s my existing code:
<% for task in @mytasks %>
<div class="rowFormat">
<%= link_to_remote(
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
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 Jan 26
2
link_to_remote > in :action , interrupt ajax to render a new page outside the :update div ?
Hello,
I have a simple link_to_remote that refresh a div. I just want to know
if it''s possible to interrupt the div''s refresh inside :action to
perform a complete reload of the page, outside of the div
Actually, I havea a new page, but loaded inside the ":update" div.
Someone have an idea please ?
the rhtml:
****
link_to_remote "yeah" , :update =>
2006 Aug 17
2
link_to_remote option :onsuccess, execute js function
How should I define the :onsuccess option in my - link_to_remote - tag,
to execute a Js function
I wrote :
:success => "toggleButton(this, /db_bfilter/i);"
''this'' is the current element defined in my view :
<span id="db_bfilter0" class="depressed"><%= filter_link_helper "This
week" %></span>
<span
2006 Apr 22
3
quick ''link_to_remote'' question
Hi all
i''m using link_to_remote to render different sets of text-input fields.
i''m setting up links in a sidebar to do this
so, in my _sidebar.rhtml i have
<%= SidebarItem(''catalogue'') %>
this works...(in works.helper.rb)
def SidebarItem(name)
link_to_remote "#{name}",
:update => ''EditFields'',
2005 Oct 17
7
Ajax.MultiUpdater ?
Hi,
I''m using prototype within ruby on rails.
One limitation I''d like to overcome is the restriction of beeing able to
update just one html elements content using from_remote_tag or
link_to_remote.
AFAICS this is just a restriction of the form_remote_tag/link_to_remote
implementation and it''s underlying Ajax.Updater class. Right?
In theorie there should be no problem,
2006 Jun 26
8
[Semi OT] BlindDown and a floated div
I am using the drop shadow technique described at
http://www.1976design.com/blog/archive/2003/11/14/shadows/ to give
several of my divs drop shadows. That part works fine.
What doesn''t work so well is when I try to BlindDown a div in Firefox
and it ends up ignoring the content below it and just overlapping it.
In IE this problem does not occur. In Firefox the overlapping does
2008 Feb 13
8
comparing ajax.updater div in js
This is really bugging me no matter what I''m trying.
In javascript, I''m using the ajax.updater, and it (obviously) writes
back out to a div. I want to then compare what was echoed out into
this div (which came from the php file I listed in ajax.updater) with
a string.
test should equal "SomeString" because that is what is being echoed
out to
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
2010 Nov 17
1
How to enable div that was hide using JQuery
I Have used Ajax and JQuery link to enable new and close functionality
problem scenario:
* While using ajax link to open the new content and closing the same
using Jquery link its working fine wherein the same does not happen
again while we try to open the new content immediately after closing the
"New content"
* The above said works fine only while we refresh the page
How to resolve it
2006 Aug 18
7
Rewriting URLs - help needed
Hello -
I''m grappling with some tricky URL rewriting with Apache 2 and mod_rewrite,
and could use a hand.
Briefly:
URL for application is: www.servername.com/path/to/app/
There is no Alias directive; the application is in the directory
/www/content/path/to/app/ on the server file system.
The FastCGI dispatcher (dispatch.fcgi) lives at:
/www/fcgi-bin/path/to/app/dispatch.fcgi
Inside
2006 Apr 30
0
Using a DIV or SPAN for a content_tag (link_to_remote)
I was wondering if there was an easy way to over ride the <a> tag
that is used as the content_tag() value when using link_to_remote(),
perhaps using a SPAN or DIV. I see follow the chain in the source
code and I guess I could write my own helper, but I was wondering if
there was a way to do this already?
I know already that SPAN''s and DIV''s are not supported
2006 Aug 14
4
Updating a table with Ajax
I''ve been banging my head against the wall trying to update a table
(add/delete rows) using Ajax. It seems simple enough but just doesn''t work
for me. I can get it to work using DIVs instead of a table, but doing the
layout with DIVs is much more cumbersome and I know it works for others with
a table (though I haven''t been able to find an exact example code anywhere).
2006 Mar 09
5
link_to_remote id or class
Can anyone out there tell me how to add a class or id property to a
link using link_to_remote? I''ve been banging my head on this for far
too long.
Thanks
Clint
link_to_remote, how to send "data" to another <div> when something system detects something wrong???
2006 Jul 10
0
link_to_remote, how to send "data" to another <div> when something system detects something wrong???
HI,
I try use link_to_remote to do a ajax update on my
page,
when eveything is OK, the syetem returns data to the
ajax zone, but when there is something wrong, like the
entry wasn''t correct, I want to send data(a message)
to another zone (the zone is defined in the layout
(message zone used flash[:notice]) I was never able
send data to the other zone, because it is on the
layout, and I
2007 May 10
2
link_to_remote fix, should this be added to edge rails?
After looking at the link_to_remote tag for the first time, I found it
broke when javascript was disabled.
Below is one possible solution I found and would like to suggest that
this idea is promoted into rails.
#
# provide fix for link_to_remote tag when javascript is not enabled
def link_to_remote_fix(text, options)
link_to_remote text, options, :href => url_for(
2006 Aug 17
2
link_to_remote question
I''m using link_to_remote to call a method that deletes an item
<%= link_to_remote " [delete]", :url => { :controller => ''user_admin'',
:action => ''employee_type_delete'',
:id => employee_type.id
}
2009 Jul 11
6
conditional link_to_remote not re-rendering
I have an int, ''floorfrozen,'' in my table, ''channels'' that can take a
value of 0 or 1.
When I render a page, an image in a link_to_remote is called
differently depending what the value of channel.floorfrozen is, in a
partial, as follows:
<% if @channel.floorfrozen %>
<%= link_to_remote image_tag("/images/icecube.gif"), {:url =>
2006 Mar 01
4
link_to_remote, doesn''t receives params?????
Hi,
I''m using link_to_remote to trigger an ajax zone, but
depends on a varaible, the new zone has different
features. before I has a button inside a form. so when
I click on the button, I get the value of the variable
inside "params". but since I use link_to_remote now, I
don''t get any value from params anymore.... Is there
some way I can get the data inside a form