similar to: problem trying to update multiple <DIV> elements with AJAX

Displaying 20 results from an estimated 400 matches similar to: "problem trying to update multiple <DIV> elements with AJAX"

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 Apr 12
22
Dynamic Select Box
Hi, I''m new to rails/ruby having come from PHP and am just starting to get my head round how easy it can be :) However, can anyone point me in the right direction for dynamicaly updating a select box based upon the choice of a previous select box, without a page refresh. Any and all help greatly appreciated. Thanks -- Posted via http://www.ruby-forum.com/.
2005 Aug 17
5
asynchronous Ajax.Updater
I had one point in my project where I needed a synchronous Ajax call; in other words, I wanted the Ajax.Updater call to not return until the content of my page had been updated. However, I found that if you call Ajax.Updaterwith the {asynchronous: false} option, the onComplete() function would never be called and your content would not be updated. Was this the intended behavior? I added the
2006 Feb 05
0
Using javascript with update_element_function
Hi, I am using evaluate_remote_response and update_element_function, to update elements with blocks of content, something like this: <% update_element_function("div_id", :binding => binding) do %> <div id="newdiv_id"> This is a new div! </div> <%= draggable_element(''newdiv_id'') %> <% end %> That will update the
2005 Dec 07
3
update_element_function fail gracefully?
I am using the update_element_function to update the text in some elements. This works fine, however, if I try to update an element that is not on the page anymore, it fails silently and no further javascript statements will be executed within that same request.responseText. Is there a way to fail gracefully in this scenario and ignore the missing elements? Thanks, Tom
2006 Feb 01
0
Using draggable_element doesnt work with update_element_function
Hi everyone, I am writing a ruby on rails application, and making heavy use of AJAX calls and evaluate_remote_response. In my remote responses I often have several update_element_function calls going on, to update several divs on the page. What I am doing is calling update_element_function, with the content as a block. Inside the block I usually have html, or make calls to other partials or
2005 Dec 21
1
for_remote_tag to update diffrent <div> depending on call result ....
hi, is there a way to use form_remote_tag to update one div or an other depending on the call result...??? perhaps with evaluate_remote_response but can''t get it to work. help thanks olivier
2006 Apr 11
2
link_to_remote to update multiple components
How would go about to update multiple components when using link_to_remote? I''ve got a button that lets you switch between languages and it has to update every component in my application (like, let''s say: the main screen, the top navigation bar and the search bar). Each component is created in a different DIV and whenever the language is switched, the entire application
2006 Feb 03
2
JavaScript Prototype Help?
I have a form with a text area. I want to have an observer watch the text area and update a div with the running count of characters in the text area. I tried "onchange" but that doesn''t update until you leave the text area. I was able to get it working using AJAX, but it''s silly to make a needless round trip to the server, when the page already knows
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 15
4
RJS template eating encoding
I was previously doing an update via .rhtml templates creating an AJAX :evaluate_remote_response. I use UTF-8 in my pages, and my app requires that I be able to, say, put Japanese characters in. The problem is that when I switched this over to an RJS template it started eating the encoding. I now get garbage characters where before I got the correct ones. The code for the RHTML: <%=
2006 Sep 10
2
Issue with radiobutton and remote_function in IE.
Hi there! I did implemented the radio button with remote_function to update some div via RJS. It works perfect with FireFox, but behaves weird with IE. When I click the radio button it loads data (I see the indicator showing) but not updates the div with info until I click left mouse button anywhere. It''s weird =( Here is the snippet from .rhtml code <td>
2006 Jan 30
10
form_remote_tag and redirects
I would like to have a login box setup so that if incorrect info is submitted, the box "shakes" via Effect.Shake. If the correct information is submitted, I want to redirect to some other page. The only solution I''ve found is the following, which is pretty ugly, as it displays the javascript I''m invoking on the page prior to the redirect. Here is the code: The Form
2005 Dec 27
0
update_field question
I''m using update_field to update a <div> with the contents of a text_area as it''s updated by the user (a-la-Typo preview style). I''m now trying to preload the <div> so that it shows the contents of the field being edited even if that field doesn''t get edited. In other words, update_field is only called if the field is updated, but I want the
2006 May 24
0
Javascript as content parameter for update_element_function?
Is there any way to do this? The goal is to have the update_element_function update a div with alternating strings. Is there a better way to do this? Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060524/a99b90de/attachment.html
2006 Jan 01
0
Using standard helper methods in my helpers
Hi... I''ve written some simple helper method. My method uses standard helper methods from Rails. When I try to use them from templates - everything is working, but when I try to execute from my helper I get an exception. Here is my code: module ApplicationHelper def reset_add_function r=update_element_function("add") { link_to_remote( "Nowy watek",
2005 Sep 01
0
Teething problems with Ajax.updater
Hi all, Forgive what I expect is a silly question. I have the following code: #CONTROLLER def calculate render :partial => ''calculate'' end #CALCULATE PARTIAL <%= update_element_function("update_1", :position => :bottom, :content => "<p>New product1!</p>") %> #VIEW <p><label for="order_unit_price">Unit
2005 Dec 30
11
Losing my mind with Ajax link_to_remote
I''m playing around with Rails, and I can''t get this to work. I just can''t seem to wrap my brain around it. I''m having some trouble doing an Ajax navigation column. Here''s what I have: view layout: <div id="navigation"> <%= render(:partial => "navigation", :collection => @categories) %> </div> My
2006 Mar 13
2
How to apply an effect to a link_to_remote :update without using evaluate_remote_response?
Hey all, I''ve been trying to apply a slide-down (or highlight) effect to a "New card" link on my application. Because the item is *new* and I''m simply updating it at the top, I can''t know what the div id is before I make the request. link_to_remote :complete => visual_effect(:slidedown) doesn''t do what I want it to do. My current solution is:
2006 Aug 16
8
Multiple (AJAX) Observers on the Same Field and MSIE
I have been using multiple observers, i.e., observe_field(), on the same input field and relying on them to execute in the same order that they appear in the page. This has been working fine in FireFox, but it does not seem to work in MSIE; the requests come in and are processed in a different order. Now, I''ve always been a little hesitant about using this technique, but it always