similar to: Action with multiple parameters

Displaying 20 results from an estimated 90000 matches similar to: "Action with multiple parameters"

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 =>
2008 Nov 07
1
RJS show as 'try...' in AJAX update
Hi guys, I am trying to display Javascript code after an Ajax call. It is executing the JS code, but it''s also displaying it. It shows as: try { alert(...); } catch .. ... my controller code: render :update do |page| page.alert message_var end my Javascript code: new Ajax.Updater("div_id", my_controller_url, { asynchronous: true, evalScripts: true,
2008 Mar 22
4
Ajax.Updater not fully work in IE7
My code snapshot: correct work in FF , Opera and Safari, but in IE7 - isn''t return result <form action="test.php" method="POST"> <div id="country" style="border: 1px solid #ccc; width: auto"></div> <br/> <a href="javascript:getTest()">test</a> </form> <script
2006 Nov 28
1
observe_form, observe_field, dynamic forms help
I made a pretty lengthy post on what I''m doing here: http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/89a2b8e54a874dd9 Short version: I have a radio_button group of two. If one is clicked another pair of radio buttons is added, if the other is clicked it is removed. observe_form does not work for elements added after initial page load. observe_field does not work
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
2007 Mar 02
12
Prototype: Ajax.Request w/asynchronous: false
All, I have the following Ajax call: new Ajax.Request(action, {asynchronous: false, method: ''post'', parameters: params_to_pass, evalScripts: true}); The action that I''m calling is using render :update to send back Javascript. When asynchronous is set to true above, then the Javascript is executed (because of evalScripts:
2007 May 25
1
form_remote_tag :condition
I am using the following validation prototype-based js library: http://tetlaw.id.au/view/javascript/really-easy-field-validation What I am trying to do is upon submitting a form via AJAX, I want it to meet the conditions of the validation of the function validateMe() If it passes, go ahead and continue and push the form information via an AJAX call. This is what I have: <% form_remote_tag
2007 Oct 24
3
addClassName and removeClassName
Hi, and sorry for the noob question! I have an unordered list of 4 links where the links use Ajax.Updater in the onclick: onclick="new Ajax.Updater(''ajaxarea'', ''link1.php'', {asynchronous:true, evalScripts:true }); return false;" How would I go about using addClassName and removeClassName to show the current link? Thanks for any help with this.
2007 Jul 12
1
remote_form_for behavior on javascript submit();
Hey all, Tried this on the IRC channel but after an hour i figured nobody that was on knew, so i''ll try it here. I have a rhtml page with: <% remote_form_for(:performance_goal, :url => user_performance_goal_path(@user.account, @user, @performance_goal), :html => {:id => ''sidebar_form'', :method => :put}) do |f| %> <%= f.text_area :impact, :size
2006 Jun 14
0
Bad behaviour in Internet Explorer
Hello, I''m using scriptaculous and it is great but they are very slow and don''t show the element when I drag it in IE6. Someone know something about drag and drop in IE? I''m using the latest version, 1.6 The code is: <div id="list[1]" > <div id="item_2" onclick="CSSUtils.show(''list[2]'')">Obras <div
2007 Dec 12
0
how can I use form_remote_tag to go to a different host ?
Here''s sort of what I am trying to do if it''s possible: We have a server that uses TCL and can''t do any ajax. What I did was wrote a simple Rails app that uses form_remote_tag to get some text on a post and then displays back some text into a div via ajax and a partial render. I wanted to take all the html, javascript, and ajax calls that the Rails template creates
2009 Mar 18
1
Ajax file upload with remote_form_tag
when I tried below, it worked <form target="upload_iframe" action="/profile/validate_charts_file" id="upload_charts" method="post" enctype="multipart/form-data"> <input type="file" name="charts_file" id="filename" /> <input type="button" name="submit"
2005 Dec 11
1
redering CDATA wierdness
I am attempting to do the sortable_element tutorial from scriptaculous. (http://demo.script.aculo.us/ajax/sortable_elements) Upon viewing the script.aculo.us source, I see this line is generated... <script type="text/javascript">Sortable.create(''list'', {onUpdate:function(){new Ajax.Updater(''list-info'', ''/ajax/order'',
2009 Feb 10
2
form_remote_for NOT passing param: I want put and I get post
Hello, I''m struggling my brain with this ajax issue ... Basically I have a form for creating records, and I want to submit it using Ajax. On previous versions of RoR (2.0.2) it was working, but the same methods doesn''t work on 2.2.2, and I started to make changes and changes and read forums and the api, but no way ... <% form_remote_for (:expedient, :url => {:action
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 Jul 22
3
How do you find out what action rendered a page
Hi I have this list page that has some rjs templates updating parts of it including a table of results. i''m trying to put pagination on the table. thing is lots of different actions update the table and they have their own paginators. anyway i have this code at the bottom which worked for another page <%= pagination_links_each(@offer_pages,:window_size =>4) do |n|
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 Oct 28
2
onchange="document.forms[0].submit()" - how to CANCEL
Goal: I want to auto-send a form whenever any field changes. The page will be updated "via Ajax", so standard submission is cancelled. Idea: Add onchange="document.forms[0].submit();" to every field Problem: Can not cancel form submission. Browser redirects to "results" page, which is of course JavaScript meant to dynamically update the page. RHTML snippet:
2008 Jan 23
2
CSRF / cached authenticity tokens / ajax requests
I''m going to go out on a limb here and say the new CSRF protection in Rails is flawed. Why? Forget about caching if you care to use it. Consider the following: <% cache do %> <%= link_to_remote "Add To Favorites", :url => {:controller => "favorites", :action => "create", "movie_id" => 2} %> <% end %> # Output <a
2007 Jan 21
0
Safari doesn't pass the headers.
When I try to update content through ajax It doesn''t work on Safari. I''ve opened a ticket http://dev.rubyonrails.org/ticket/7087 for full reference. The test case is the next: /app/controllers/problem_controller.rb class ProblemController < ApplicationController def index render :action => ''index'' end def myrequest render(:update) {|page|