Displaying 20 results from an estimated 4000 matches similar to: "disable submit_tag after click"
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 =>
2006 Feb 27
2
submit_tag
How can i use the submit_tag method (from: actionView::FormTagHelper)
to create various submit buttons and chose the right action in accord to
the button that i pushed?
--
Posted via http://www.ruby-forum.com/.
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
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 24
4
javascript in RoR page - Check ALL/uncheck ALL buttons
I am trying to implement a check all and uncheck all button for my check
boxes.
Here is what I have below. I am getting this error each time:
Error: document.myform.add_visit_for_this_Pt has no properties
Source File: http://localhost:3000/AddPatientVisit/addvisits
Line: 1
Strange that I can''t seem to pass value into the function.
Thanks for your help!
<SCRIPT
2006 Jul 14
3
Rails newbie: How does the submit_tag work?
I would appreciate any and all input. The Agile book is not useful in
this context. :o(
As near as I can tell, it doesn''t work at all.
I would expect that clicking on the [Next Question] button in the
browser would fire the next_question method in the current controller.
Instead, it (apparently) does nothing.
The tag in question
<%= submit_tag ''Next
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
2008 Oct 14
4
replace_html not working
hallo, everyone
can anybody help me? i did add my code under ENGINES as a module in a
project. before the change , all worked . and the differenz between
both is only about application''s environment,
before is
Ruby version 1.8.6 (i486-linux)
RubyGems version 1.1.1
Rails version 2.0.2
Active Record version 2.0.2
Action Pack version 2.0.2
2005 Mar 25
4
ajax and clearing the form
Hi
I played a little bit with rails+ajax, works fine...
but how do I reset the form?
I tried:
---
<%= form_remote_tag(:html => {:name => ''form_update''},
:url => :url_new_item_with_ajax,
:update => ''container'',
:loading => "Toggle.display(''new-item''); $(''new-item-desc'').innerHTML =
2008 Feb 13
2
javascript pop window from form how to update field back to main form
Hi
I have question where I run web form. Now on this form I have one
field with link select user.
This link will pop up new window with javascript and on this window I
have form with items
which end user can select. Once selection is done end user press
button Select User.
Now I need to close that javascipt window and send back value of that
selection back to form
and to the field which has
2006 Jul 10
17
Effect.SlideDown/Up() and HTML issues
Hello,
I''m hoping this is the right place to ask these kind of questions. If not,
please excuse me. Anyway, the problem I''m having is that I have a HTML table
showing some tabular data and I want to use Effect.SlideDown/Up to allow the
user to interactively show "details" for each item (<tr><td> etc) in that
list.
I''ll do some pseudo-code for
2006 Feb 08
5
debugging 500 Internal Server Error when dispatch.fcgi run?
I''m trying to get my Ruby on Rails application to work under Apache. It
works fine when run as WEBrick ("ruby script/server").
As suggested in
http://www.ocssolutions.com/support/ruby/troubleshooting-ruby-on-rails.php
, I tried running dispatch.fcgi on the command line. When I run it, no
matter where I run it, it outputs:
500 Internal Server Error
Both the #! (shebang)
2008 Apr 30
5
Quick Submit Button Question...
Hello,
Can I pass a variable from a submit button only? I have a form that the
user fills out and I need two different submit buttons - one for ''sync''
and one for ''full push''. I was thinking I could add some sort of param
to the button, but it''s not working... is there a way to do this? I have
this:
<%= submit_tag ''push to
2006 Jan 06
3
image replacement (new Effect.*****) problem
Here''s what I''m trying to do. I have two divs, one holds about 20 small
images of products and the other holds a single large image of one of
the products. I''m trying to use the jazzy "new Effect." way of changing
images but I can''t seem to get it too work. My script is replacing the
image and then making the element disappear. What
2006 Jun 03
12
How to get dynamically created inputs from html form back to rails app
Thank you in advance.
Although I have many years of experience in general, including cross-
platform processing, I am not an HTML/Javascript programmer. As a
result, I do not have certain specific baseline skills and/or knowledge
that are presumed in the Rails and Ajax documentation.
I am experienced with DOM manipulations, so the bare mechanics of
manipulating the browser GUI via Javascript
2009 Feb 26
8
beginners question
hi group,
I am making a little rails app to experiment with rails. It consists
of one model, item, that represents an item on a todo list.
A todo item has a description, a state (finished or not) and a due
date.
After changing the scaffold screens a bit, I wanted to be able to
have no due date. I tried to do this by making a radio button; if ''no
date'' is selected, the date
2008 Apr 29
6
Intercepting an onClick file download
Hi,
I''m having some trouble downloading a .csv file from a particular
website. The file isn''t part of a url, you need to click on a link in
order to get the file sent. I don''t know how to get mechanize to
correctly identify that.
Here is the link to the file I''m trying to retrieve:
<td style="vertical-align: bottom; text-align: center;">
2008 Dec 13
2
What is "The Rails Way" to do this?
I have a PHP application with the following in one of the "views":
<input type="button" onClick="newAlt()" value=" + "></nobr>
The JavaScript for "newAlt()" is:
// using DOM create new input box for alternate part
function newAlt() {
var html = "<input style=''background-color:#FFFFCC'' ";
html +=
2006 Jun 13
1
Element.remove parent div
Hi all,
Currently I am using Element.remove like so:
<div class="blurb" id="drag_1">
<a onclick="Element.remove(''drag_1'');" class="remove"></a>
</div>
However I would like to just create a function since I''ll be removing
multiple DIVs and updating the sortable order. I just can''t get some version
2008 Jul 01
5
Attaching event observers to a series of elements - best practice?
Hi all,
New member here. I''ve been working with Prototype for a while, and I
love it. However, there''s one thing I still can''t figure out.
Let''s say I have an array of objects, representing contacts in an
address book:
var contacts = [
{ id: 1, firstName: "Bob", lastName: "Smith" },
{ id: 2, firstName: "Sue", lastName: