similar to: Newbie: Hide div I''ve just show using link_to_remote?

Displaying 20 results from an estimated 6000 matches similar to: "Newbie: Hide div I''ve just show using link_to_remote?"

2011 Feb 15
7
Hide/Show Div and link_to_remote
Hi I want to show some info and provided an ''edit'' button next to it. This will change the display info to an editable form. I''ve seen this done before, but what I can''t figure out is whether I have to use an actual remote action to the rails server? I think I should be able to render both the edit box and the display info as seperate divs, and then show/hide
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 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 May 01
3
Make a checkbox checked based on a condition?
I have a series of checkboxes in a form generated as follows: <% for user in @active_users %> <p><%= user.firstname + " " + user.surname%> <%= check_box ''assigned_tasks'', ''user_id'', {:index => user.id}, user.id, nil %></p> <% end %> I''d like to have one of them selected when user.id is equal to the
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 Mar 22
4
Newbie - populating select list from db
Can''t seem to find an example of this anywhere - how do I populate a select list in a form from a database? I have a form to create a new task. The task is for a client, so there should be a select list populated from my clients table. I thought this would work: <%= select ''task'', ''client_id'', Client.find_all, "id", "name"
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
2009 Jul 24
5
padawan seeks advice from jedi masters to create toggle box via ajax/rjs before slitting wrists with ruby powered light-saber.
I AM TRYING TO MAKE A DAMN TOGGLE BOX, BUT USING MY OWN GRAPHIC AND HAVING THE MOUSECLICK TRIGGER BOTH SWITCHING THE GRAPHIC (via AJAX) AND SAVING THE STATE IN THE DATABASE. I GOT IT ALL WORKING WITH NORMAL HTML GET CALLS TO THE SERVER, BUT I NEED IT TO BE AJAXIFIED SO THAT THE PAGE DOESN''T RELOAD. AND TO COMPLICATE MATTERS, IT HAS TO WORK IN A TABLE WITH AN ARBITRARY NUMBER OF ENTRIES,
2006 Apr 05
7
Conditional toggle button
I have a link_to_remote that updates the content of a hidden div and makes it appear.. But I want it to hide the div and not execute the link_to_remote function on the second click. What''s the best way to do this? I''m thinking I can do it in RJS maybe, but I''m not sure if there''s a nice Rails-y way to tell if a div is hidden or not.. I''d also
2006 May 18
2
Newbie: Looking for a good starting reference
So I finally got everything up and running, and I''ve seen some "magical" stuff in tutorials bragging how easy and wonderful Rails is (and I believe it, for the most part). What I need now is a reference, a site or a book, that respects that I know a thing or two about app development and programming, but not necessarily anything about models, classes and controllers. I
2006 May 01
1
Show/Hide with AJAX
I''m trying to implement a show/hide details function. I have the show part done, but I''m not sure how to get it to hide. My app looks like this so far: View: <%= link_to_remote "Show/Hide", :update => "details", :url => { :action => "show", :id => leif } %> <p id="details"></p> Action: def show @leif =
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
2010 Aug 31
6
ajax and partials
Hello all, I am still very new to programming and wonder if I could get some help. I have tried to figure this out myself but still having trouble with some of the concepts. I’ll do my best to explain the problem and include the code. I may be completely off track, so ANY direction offered would be deeply appreciated. I have a question model / object which consists of a question, answers, and
2006 Mar 18
3
Weird stylesheet_link_tag issue after moving servers
Dear experts, I am in the process of switching servers for my application. Before the move everything was working properly. After the move <%= stylesheet_link_tag ''/stylesheets/styles.css'' %> generates <link href="//stylesheets/styles.css" media="screen" rel="Stylesheet" type="text/css" />
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 Feb 28
2
AJAX: do render but show element in same click?
I''m a rails newbie. I''ve got a link_to_remote that puts a partial render into a div ("note1", "note2", etc.). As part of the display that comes up, I put in a hide note link (element.toggle). Click that, the div goes away, everything''s great... except now I can''t get it back. How can I call the remote AND make the div show at the same
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
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 }