similar to: link_to_remote() question from a newbie.

Displaying 20 results from an estimated 4000 matches similar to: "link_to_remote() question from a newbie."

2006 Jan 11
0
AJAX: link_to_remote problem
I use: <%= link_to_remote("Update", :update => ''mydiv'', :url => { :action => :create, :host => ''rails'' }) %> which generates the following: <a href="#" onclick="new Ajax.Updater(''mydiv'', ''/account/create'', {asynchronous:true, evalScripts:true}); return
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,
2006 Mar 29
0
I can''t get to work css class with link_to_remote function
What am I doing wrong? This is the code <%= link_to_remote "Mi Cuenta", :update => "MainSpace", :url => {:controller => "account", :action => "login"}, :class => "menu_link_superior" %> This is the result <a href="#" onclick="new Ajax.Updater(''MainSpace'',
2006 Feb 28
4
No action from AJAX link_to_remote...
AJAX & Ruby & Rails newbie here. I''ve got a link to remote that I believe should be working, but doesn''t seem in fact to do *anything*. I''m looking at the webrick log, since the Book says I should be seeing some hot POST action in there, but there''s literally no change when I click on the JS link. From looking at the source that''s
2006 Jun 28
2
Assign CSS class to Link to Remote
I''m trying to get link_to_remote to assign a CSS class to the link it generates. My code is as follows: <%= link_to_remote "Show Full Info", :update => "fullcontact" + reparray.last.to_s, :url => "/cm/full_contact/" + reparray.last.to_s, :classname => "contactlink" %> Which produces this HTML: <a href="#"
2006 Dec 04
0
lint_to_remote for image
I have some simple code so that when you click on a thumbnail, it''s supposed to display the image enlarged in the enlargement area. The page looks right, but when you click on a thumb nothing happens, it just moves up the page. Why is the href=# happening ? The generated html comes after the sample rhtml <%= image_tag @enlargement, :width => "279", :height =>
2006 May 23
0
html "class" attribute for "link_to_remote"
Hi, now this should be easy, but for some reason I was not able to generate a link with a "class" attribute using "link_to_remote". I tried several different ways, including the one that worked for "link_to", but so far no luck. I have to admit that I am not 100% sure how to read the rDoc documentation. If it says: link_to_remote(name, options = {},
2006 Mar 18
2
Additional link tag attributes with link_to_function...
Hi, I''m having a bit of a struggle with link_to_remote. Everything works exactly as I want it, but the problem is that I want to add another attribute to the <a>-tag, namely class="". Long story short, I want specific links to look differently from others, but all of them being link_to_function. Normally, I''d do this with adding a class="foo" to
2005 Oct 16
13
More than one parameter with link_to_remote
Hi all, I''m trying to pass more than one parameters using link_to_remote, but I''m getting a behaviour that seems quite strange to me. Here''s the code: link_to_remote ''some text'', :update => ''form'', :method => ''get'', :url => { :action =>
2006 Apr 13
1
Adding a title to an AJAX link.
Hello all. I am trying to add a title to a link_to_remote created AJAX link. What I want to create is: <a href="#" title="VALUE-HERE" onclick="new Ajax.Updater(''content'', ''/area/show/28/40'', {asynchronous:true, evalScripts:true}); return false;">Area Name</a> However I cannot seem to get it to work, the API says
2007 Aug 12
0
Newbie: AJAX not working - Undefined Method error
Hello I have included prototype in my Applications rhtml file <head> <%= javascript_include_tag "prototype" %> <title>FLYPRO </title> <%= stylesheet_link_tag ''flypro'' %> </head> I call link_to_remote in a page as follows <div id="flypro-list"> </div> <%= link_to_remote("Do
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
2007 Jul 06
0
Removing One Element From a Serialized Form
Hi all, I''m trying to serialize a form with the exception of one specific element. Serializing the form in a hash (without pulling out specific elements) works: <li> <%= link_to_remote ''(Save)'', {:url => post_path(@post), :with => "$ (''post_form'').serialize(true)" }, :method => :put %> </li> The generated code
2008 Feb 01
1
render partial in div
I have this link which when clicked will loop and render more links and a form from a partial inside of "myDiv": <%= link_to_remote ''MyLink'' . . . ., :update =>"myDiv" %> <div id = myDiv> <div> <div> <div> What I am trying to do is have a form_remote_tag that re-renders the list of stuff in "myDiv" when
2007 Aug 26
0
escaped ampersand in generated restful url
I am using a restful helper method to build a url for use in a link_to_remote method and for some reason the generated url has the ampersand that separates the parameters escaped (i.e. /action?param1=1&amp;param2=2 instead of /action?param1=1&param2=2) Any ideas why and how to make it stop? :-) The code in question resides in a helper, if that matters... Cheers, s0nspark -- Posted via
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 Apr 25
0
How to manage one to many within application.
Hi, I have an application with a customer model, and an address model. A customer has a one to many relationship with an address. I currently have an add new customer page, that incorporates an "add address" button, which places a helper form within a div using the link_to_remote function. I can click the add address button multiple times, and it will add multiple address
2007 Sep 18
0
Help with RESTful named url options
I''ve found quite a few posts on the subject, but no satisfactory answers. Maybe Rails just doesn''t support this yet. How do I create a url with a named RESTful route that also has parameters? I want to write this: link_to_remote "Show Details", {:url => item_url(@item, :details => 1), :method => :get} And get this: <a href="#"
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 Apr 18
4
update_page yields escaped code in callback
Hi All, The subject pretty well describes what I am experiencing. This line in an .rhtml template: <%= link_to_remote menu_item.humanize, {:update => ''section'', :url =>{:controller => menu_item}, :complete => update_page do |page| page.activate_tab("#{menu_item}_tab", ''menu_'') page[''section''].hide