Displaying 20 results from an estimated 30000 matches similar to: "pass parameter to post method with link_to_remote"
2006 Apr 19
2
how to pass a hash as a parameter in link_to_remote
When using link_to_remote, I''d like to pass along some auxiliary data in
the request. It''s a hash of dynamic data that can change with each
request.
But I get an error when rails trying to "stringify" the hash.
For the regular link_to, it works because it turns the hash into a
regular GET-like query string.
I''m expecting to be able to get my hash as
2006 Apr 04
2
How to add CSS tips to link_to_remote?
The following code of tag clouds implementation:
<%= link_to(h("<#{tag}>"), "tags/listmytag/#{tag}", { :style =>
"font-size: #{font_size}" } ) -%>
I want to change it to ajax style:
<%= link_to_remote "<#{tag}>",
{ :url => { :controller => ''tags'', :action => ''listmytag'', :id =>
2006 Jun 15
2
AJAX form inside table - error
Hello,
I need to put an AJAX, form such that it is inside a table, and spans across
few rows.
But, what I am noticing is that, while submitting the form, the data in the
fields is not submitted.
If I move the form outside the table or inside a cell, things work OK, but not
when the form is inside the table and spans few rows. This problem is only
with AJAX forms, regular forms work perfect. I
2006 Jan 17
2
link_to_remote() - can I post data with it???
can I post data with link_to_remote(),
link_to() has special option :post => true and viola
Thanks in advance
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060117/2a0a00af/attachment.html
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
2008 Feb 01
1
problems with link_to_remote and send_file
Hi everyone,
I working on an app that at some point generates an xls report(charts,
summary lines, etc) and sends it to the user.
If i use link_to everything works fine; however when change to
link_to_remote so i can make an ajax call it doesn;t seam to work ( i
do not get the save/open dialog box)
def exp_to_excel_2003
@filepath = "#{RAILS_ROOT}/public/files/Metrics Report.xls"
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
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
}
2006 Jul 09
6
ajax effects
Hi,
i was wondering if there was some kind of general line of code i could
add to my application, anywhere i suppose, that would generate some kind
of effect to notify the user that an effect is happening...it could be a
box on the top of the screen or something, that would be like the small
bar at the end of the browser that shows the user the status of a
loading page ... i was hoping
2006 Feb 18
2
Extending the onclick properties with link_to ?
I''m currently using a link_to function to generate an Ajax call. I''d
like to be able to introduce other operations that occur upon click but
I''m not aware of a way to add to link_to''s funtionality.
I have a div which is hidden and would like to set it to be visible
before (or after) the Ajax call.
--
Posted via http://www.ruby-forum.com/.
2006 Mar 21
8
How to avoid multiple submits/posts?
Hello,
How do I prevent previously submitted form data from being reinserted into
the database when the user presses the browser''s Refresh button?
On Aughey''s advice in #irc I tried using `redirect_to'' a new `:action'' but
this approach doesn''t seems to work.
Any idea what might be wrong or how to tackle this problem?
Thanks for your help.
P.S.- I
2006 Jan 29
0
Pagination and AJAX
How does one do pagination with link_to_remote calls so the
pagination can be done with AJAX? For example, this obviously works
out of the box with the standard scaffold:
<%= link_to ''Next page'', { :page => @image_pages.current.next } if
@image_pages.current.next %>
to get users to the next page.
The tutorial at: http://wiki.rubyonrails.com/rails/pages/How+to
2006 Feb 20
0
Ajax and tables
Guys,
I want to be able to update the contents of a table without dedrawing
the entire thing. Basically, if the user clicks on the 2nd column then i
want to turn that cell red, the 3rd green and the 4th blue.
I have the table drawing correctly now but not updating correctly. I
can''t get the update to work on the div unless its inside the table
cell. I was hoping to have the div
2006 Aug 24
1
link_to_remote parameters - help
I''m trying to show a preview of the comments, and I''m saving the
comments through AJAX. So, I thought that I should be able to mimic the
"comments" action for the "comments_preview" action very easily. So
far, this isn''t the case.
I have a link_to_remote tag inside of the form tag, and I don''t know how
to send the parameters that are
2006 May 18
2
How to add hint to link_to_remote?
To add a hint to normal link is very easy:
link_to ''design'', {:action => ''design'', :id => survey}, :title =>
''Design the survey''
but, after trying several times, I still can''t figure out how to do the
same to link_to_remote. I''ve tried put :html => {:title => ''blah''}. It
doesn''t
2006 Jun 01
1
link_to_remote renders Ajax.Updater, sometimes Ajax.Request
I''m new to Rails, but am really enjoying working with it.
But i just hit a brick wall...
I have two link_to_remote tags in two seperate _whatever.rhtml files.
The targets of the updates are in edit.rhtml which does a render
:partial to include the links. here''s some code:
<%= link_to_remote ''Destroy'',
:update => "libtable",
2007 Mar 06
1
link_to, image_submit_tag, "changes only with POST" and "usability without Javascript" question
Hello,
I want to have the following features in my rails application:
1. the program should have AJAX if Javascript available
2. I want to protect my application described in
http://www.w3.org/2001/tag/doc/whenToUseGet.html - means GET should be
safe
3. if Javascript is disabled the application should work too (without
AJAX)
If I use "GET should be safe" option (verify) and link_to
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 Jun 21
1
how can I get the value of a hidden field and pass it
My problem is that I want to pass a date information form one page to
another. And that information came to my page in an Ajax petition.
My idea to accomplish this is that the date can come in the Ajax
response as a hidden field and when I click a link I can get that hidden
field value and pass it to the action in rails as a param.
I have done all this. I have the date in a hidden field and I
2009 Mar 26
1
Lightbox popup on ajax pages....
Hi,
I''m using lightbox.js for displaying chromeless popup windows.
I have a main page on which I have javascript_include_tag and
stylesheet_link_tag to include lightbox.
Calls to the lightbox popups from this main page work perfectly...
But....calls to the lightbox popups from pages which are called by
ajax(using link_to_remote) from the main page do not work... :(
They work like