similar to: link_to :post true Newbie question

Displaying 20 results from an estimated 20000 matches similar to: "link_to :post true Newbie question"

2008 Feb 19
1
adding an onclick option to link_to method
Hello, I''m trying to use the rail link_to to open a popup window and then print the popup window at the same time. Is there a way to add another "onclick" option to tell the popup to print? I know how to do this in javascript but not sure how to use the rails help to do it. I also am aware that the link_to_function method is used to call a javascript function.
2006 Jan 17
6
link_to or helper to generate a javascript:history.back() ?
Hello, There is an link_to option or an helper that generate a link like : <a href="javascript:history.back()">Back</a> Thanks
2008 Mar 16
1
form_for error
Hi all, I have the following code in my application layout: <div id="utility"> <% if logged_in? %> <%= link_to "Sign Out", logout_path %> <% else %> <%= link_to_function "Sign in", "$(''signin'').toggle();$(''signin_link'').toggle()", :id => "signin_link" %>
2006 May 09
1
Reusing a model to form and link_to.
Hy guys, Inside my app I have a form which contains user information. Sometimes a have a form with a text_field as above: <%= form_remote_tag(:html => { :action => url_for(:controller => "my_controller", :action => "my_action") }) %> <%= text_field(''my_object'', ''my_parameter'', :maxlength =>
2008 Oct 31
6
link_to submit form value 2
Hi to all, I''d like to pass with a link to values inside some form. I''ve read in other posts that it''s possible if i include the forms inside a html <div>... So here it''s my code of the view : <div id="study"> <table> <tr><td><label for="study_titolo">Titolo di
2006 Jan 22
6
Destructive behavior with link_to, button_to, :post=>true
Hello- I would like to know what the suggested practice is for having multiple submit buttons on a relatively complicated input page. Let''s use the example of a Contact. There is lots of info there, including name, address, phone number. There is also a list of "contact associations" which can be modified on the same page. Ideally, the user could have one
2005 Aug 15
2
Newbie rendering problem
Hi On every list request i render an item partial through a collection of items. the item table has 3 columns namely name,anotherName and id. the item partial looks like <%@item=item%> <%= error_messages_for(:item) %> <tr id="<%=item.id%>"> <% for column in Item.content_columns %> <td><%=h item.send(column.name) %></td> <%
2006 Feb 07
3
Newbie help ..
Hi .. I am new to Rails and it is not clear to me why I am getting the following error. Any help appreciated. -m. $cat app/views/admin/new.rhtml <% @page_title = "New member..." -%> <%= start_form_tag( :action => ''create'' ) %> <table> <tr> <td> First Name: </td> <td> <%= text_field(
2009 Jan 08
4
Problem with disable_with
Hi Group, I have a registration.html.erb page with the following JavaScript at the top which I use to validate form fields: <script type="text/javascript"> <!-- function validate(){ if ((document.myForm.email_projectname.value=="")|| (document.myForm.email_projecttype_id.selectedIndex<1)|| (document.myForm.email_region_id.selectedIndex<1)) { alert
2007 Jun 26
3
what is the :or parameter in a submit_tag ?
I read the following tag in teh Beast example <%= submit_tag''Login'', :or => link_to_function(''forgotten password'', "$(''reset-password'').toggle();") %> I understand the link_to_function, but what is this :or parameter used for ? the link doesn''t appear, so it cannot be used... thanks for your lights kad --
2006 Apr 29
11
Multiple actions from one form - possible?
Hello * Obviously the rhtml below does not work, but it should be apparent what I try to achieve - I would like to give the user the choice to submit a form either to action1 or action2 but I cannot figure out how?! It would be great if someone could give some assistance. Thanks a lot, Alex <%= start_form_tag :action1 => ''save'', :action2 =>
2010 Jan 20
5
disable submit_tag after click
This code disables the ''Save'' button once clicked, but doesn''t seem to send the form data. <%= submit_tag ''Save'', :class => ''submit'', :onclick => "document.getElementById(''save_button'').disabled=true;", :id => "save_button" %> This code sends the form data and a record is created,
2007 Sep 04
2
How can i add a confirmation dialog to a submit_tag?
When i use button_to or link_to, i can easily request a confirmation dialog with (for example) <%= button_to "Delete this story", { :controller => "story", :action => "delete", :id => @story.id }, :confirm => "Delete story: are you sure?" %> I also want to do this for the submit buttons on my forms, which are
2006 Oct 06
0
link_to with :post => true causes "link hop" on submit
I have a link_to function that I''m calling with :post => true. When I click it, the link (which is in a table cell) moves up a bit and pushes the next table row down just a bit, like it''s hopping. My guess is that in the generated Javascript (by link_to), the addition of the form to the DOM is causing the link itself to move. Anyone seen this before, and if so, know a
2006 Jun 13
1
How to give conditions in rails
Hi, I have Holiday table. the fileds are id,holiday_date,description. i added new records and list them also. when i listed all the records in the database are listed but i want to list only one particular year records. my holiday_list.rhtml page is as follows <%= stylesheet_link_tag "common", :media => "all" %> <%= error_messages_for ''holiday''
2009 Sep 30
2
What is this view syntax? Old beast forum code...
Hey folks A long time ago, before i started working at this company, we used a Beast forum. The beast code (models, controllers and views) were all just lumped in with our app code, but when we moved to a new version (about a year and a half ago) the forum section of our site was closed off (simply by not linking to it anywhere). I''ve been tasked with resurrecting it, and the first
2006 Mar 28
3
Brand newbie question relating to link_to
I recently dived into Rails and am having trouble with the link_to method. I''d like to pass some parameters to the action being called and am not sure how to do it. Essentially, I want to hyperlink a total count of bugs queried from the database to a method that will return the bug numbers when clicked on. I have a method, bug_total, that returns the total number to display in the
2006 Jan 20
4
[newbie]how to use link_to to link to another controller?
I am just diving into Rails and I am a bit puzzled by the link_to function. am writing an app to display my photographs in categories. My application layout has a sidebar to show a menu with categories from the categories table in the database (like in taken from the tutorials), to be shown on every page. I managed to get a global @menu_categories object that keeps track of all the categories
2009 Apr 19
1
Overriding html generated for submit_tag and selected links
Hi, Probably something simple, but I''m trying to change my submit_tag and other buttons to CSS based buttons based on the article at http://www.oscaralexander.com/tutorials/how-to-make-sexy-buttons-with-css.html Basically this needs the following HTML markup: <a class="button" href="#"><span>Button Text</span></a> So, the question is how can
2006 Mar 16
1
Newbie Question on Link_to Method
Hi, How do I use link_to method to link a page to another page in a different views folder. Say I have Projects and Issues, and on projects list page, I want a hyper link ''New Issue'' to link to new issue page. /Projects/List /Issues/New How do I code in views\projects\list.rhtml to link to views\Issues\new.rhtml? this doesn''t work: <%= link_to "New