similar to: Need HELP changing link_to_remote to a button

Displaying 20 results from an estimated 7000 matches similar to: "Need HELP changing link_to_remote to a button"

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 Jul 14
4
Help with link_to_remote or javascript generator
Hi all, I''m a relative noob to rails so I apologize in advance for asking such a basic question. I am trying to do multiple AJAX calls using the link_to_remote helper or the JavaScript generator update_page. I have googled and read the docs for both, but can''t seem to figure out exactly what i need to do. Say I have the following html: <div
2006 Apr 10
2
RJS newbie - need help with iterating / existence test
Greetings! I''m new to Ajax and am trying to get a basic app working as a vehicle for learning it. The app is an extension of the cookbook tutorial. My intent is to be able to add a list of ingredients for a recipe. The page to add ingredients uses Ajax. As ingredients are added to the page they''re displayed in a "green-bar" format like that used in the Depot
2006 Apr 14
11
Whats the best Ajax way to update a textarea''s text?
I am looking for a way to update the text-value within a textarea from an Ajax render call inside of a controller. Is there a way to do this without rendering an the partial containing the textarea? Thanks, Andy -- Posted via http://www.ruby-forum.com/.
2006 Jul 03
6
Rjs $("aaa").insertHtml is not a function error
Hi, I''ve searched the list and found that someone had the same problem as me http://lists.rubyonrails.org/pipermail/rails/2006-May/043760.html I''m have in my page a link like this <%= link_to_remote ("Add #{image_tag(''add.png'')}",:url=>{:action=>''addProduct''})%> and in my controller def addProduct ..................
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 Jul 21
10
Using an image button for "link_to_remote"
All, I want to do an AJAX request using a custom image button. I currently have this as a standard button action using "button_to". What I need is the button equivalent of "link_to_remote". Is there a helper that I can use, or do I need to build it by hand? I see button_to_function(), but that sets me up to call a Javascript function, not post to a Rails action. Or can
2007 Mar 23
11
Is there such a thing as button_to_remote?
I''ve changed my destructive link_to statements in favor of button_to. But what if I want to make an .rjs call with that button? Seems like we need something equivalent to link_to_remote, so that the button can make an ajax request instead submitting the form. Or am I missing the point entirely? Jeff --~--~---------~--~----~------------~-------~--~----~ You received this message
2006 Apr 03
3
AJAX Insertion.Before
Can anyone point me to an example of how to use the Insertion.Before technique? I''ve just begun trying to use AJAX and worked through Curt''s "Ajax on Rails". The description in AWD of what this does is just what I need, there''s no example of how to use it, and I''m getting no joy using Google. Any help is tremendously appreciated. -------------- next
2012 Apr 03
1
Connecting two overlay meshes into a single mesh
Hi everyone. I'm wondering whether a setup like the one described below would be possible with Tinc: nodeA1 nodeB3 | | (Network A) --- [GWA] --- (Internet) --- [GWB] --- (Network B) | | nodeA2
2006 Apr 08
1
How To ??? change class of DIV
I''m trying to replicate the "green-bar" effect used in the Depot app using Ajax. And I''m almost there ;-) I''m about to set off on the last stage and would appreciate any advice that would set me off in the right direction. On the page, each record is represented by a <div>. Each <div> has id = "item#{record.id}" with class = either
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 Oct 03
7
form_remote_tag and :with
I am trying to pass the result from a javascript function along with the result from a text_field with form_remote_tag. This is what I have so far, but no go: <% form_remote_tag(:url => {:controller => ''requests'', :action => ''create''}, :with => "''data=''+request()", :update => ''request_sent'' )
2006 Jul 05
4
degrading gracefully - how to tell if JS is enabled?
Is there a RoR best practice wrt determing in a visitor''s browser has JS disabled? Is there even a way to find out? I''ve got a couple of pages in my app that are not going to degrade gracefully at all. I really need to point a visitor who has JS disabled down a seperate path. Any ideas? Thanks, Bill -------------- next part -------------- An HTML attachment was scrubbed...
2006 Jul 26
3
adding class or id tags to tags like linkto and form
I''m trying to figure out things like this by myself so I don''t bother my developer and slow him down. How do I add class or id css attributes to tags like this: <%= form_remote_tag :url => { :action => "send_url" } %> <%= link_to_remote "My Profile URL", :url => { :action => "send_profile_url", :id => @user.id } %>
2007 Jul 11
1
Asterisk and Hardware Requirements
Hello, I would like to put 1 asterisk box in Country A and 1 asterisk box in Country B. Let's assume : - Asterisk box in country A = GWA - Asterisk box in country B = GWB - Calling party number (located in country A) = CgPNA - Called party number (located in country B) = CdPNB - Second Called party number (located in country B) = sCdPNB - PSTN in country A = PSTNA - PSTN in country B = PSTNB
2006 Apr 03
3
Ready to call this a bug
I''ve been trying to get a handle on AJAX today and am ready to call "BUG!" I started with the code from Curt''s "AJAX on Rails". It used <ul="my_list"> and <li> and worked fine. Except I need a table instead of a list. So I did the simplest thing that I thought could possibly work. In the view, I changed the :position attribute from
2006 Jul 12
3
Ajax, the Back button, and Sweepers
I''m working on an app that''s basically forms and that makes fairly heavy use of Ajax. As a result of the Ajax usage, if the visitor uses the back button they get the page as it was originally loaded, not as they left it. I''ve looked at the Sweeper documentation and can not tell for sure that it''ll do what I want, which is to force an unconditional reload from
2007 Dec 04
6
Problem preventing double click with ajax submit button
For a regular form I use the :onlick option to disable the submit button after the first click in order to prevent double clicks (leading to double entries): <% form_tag :action => ''create'' do %> <%= submit_tag "Create", :onclick => "this.disabled=true,this.form.submit();"%> I''m having trouble using this same method to prevent
2006 Mar 18
16
fixrbconfig - does it work on intel macs?
I''m trying now to do "sudo fixrbconfig" in the terminal, and I get this: /usr/lib/ruby/1.8/powerpc-darwin8.0/ruby.h does not exist. This probably means you haven''t yet installed Xcode from the Tiger DVD. You won''t be able to compile Ruby extensions without it. Please install it then rerun this program. I''m on an intel mac. Am I unable to use