similar to: [Prototype] Why doesn''t calling submit() on a form result in the execution of the onsubmit event handler?

Displaying 20 results from an estimated 1000 matches similar to: "[Prototype] Why doesn''t calling submit() on a form result in the execution of the onsubmit event handler?"

2006 Jan 05
8
Repost - Do dynamic finders work with legacy schemas?
Hello everyone, I have another question related to a legacy schema I am working with. Do dynamic finders work with legacy schemas in general? The schema I am working with uses hungarian prefixes for column names. For example fOpen is 0 if a bug is closed and 1 if it is open (type smallint). When I try @bugs = Bug.find_all_by_fOpen(1), I get the following exception: undefined method
2005 Dec 27
4
Using mocks
Hi, What's the purpose of test/mocks? I couldn't quite complete the Wiki entry on this because all the information I _could_ find was in the readme. - Rowan -- Morality is usually taught by the immoral. _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
2006 Jan 03
3
SwitchTower and Subversion branches
I''m working on a Rails project that needs to be deployed in the near future. To enable prompt responses to bug reports, me and my coding partner were thinking to use the following SVN repository lay-out/policy. We''re using trunk/ for our main-line development. Whenever we deploy something from our trunk, we first want to make a branch (e.g. branches/1.x) and then derive a tag
2005 Dec 15
2
Checking the existance of a NOT NULL constraint from Active Record
Hi, I'd like to check the existance of a NOT NULL constraint for a given attribute using ActiveRecord. Is this possible or do I have to painstakingly query the information_schema myself? I need this for some reflection in a custom association. Thanks, - Rowan -- Morality is usually taught by the immoral. _______________________________________________ Rails mailing list
2006 Jan 06
4
Are migrations executed within a transaction?
Hi all, Can I safely assume that each migration is excuted within a transaction, so that''s it''s safe to have migrations executing failing statements? Thanks, - Rowan -- Morality is usually taught by the immoral.
2006 Jan 05
1
How to freeze SwitchTower
Hi all, I''m wondering if "rake freeze_gems" will freeze SwitchTower as well. If it doesn''t, I could try to modify the rake task at [1] to freeze extra gems such as switchtower into vendor/ (the rake task at [1] freezes gems into lib/ which I disagree with). Is there anyone else actually using a "frozen" SwitchTower? If so, what did you do to freeze it with a
2006 Feb 12
2
link_to_remote (AJAX) and tables: IE issues, validation?
I have a table that lists domain names, with a form next to it to add new domains. I have AJAXified this so that new domains are immediately added as table rows. This works fine in Firefox 1.5/Win, but not in IE6/Win. Domains are added into the database, but the HTML table is not updated unless you reload the page. Some googling tells me there are issues with e.g. link_to_remote updating
2006 Feb 23
1
Ajax, validation, flash messages & redirects...
Hi everyone, I''m working on an file upload page that uses an ajax progress bar (http://sean.treadway.info/demo/upload/). I''ve also got validation on the uploads (must be a certain file size/mime type etc). When uploads pass validation - all is dandy. But when they fail - I can''t work out how to redisplay the form with the flash error messages (that normally appear
2005 Jun 29
3
Setting the value of a primary key field
I have a table that is to hold all ISO 639 language codes: alpha3t, alpha3b, alpha2, that bunch. It also (indirectly) holds language names, but that''s off-topic. alpha3t is the primary key, so I''ve told Active Record about this by saying set_primary_key "alpha3t" within the Language model. (Don''t try to call your models things like ISO639 (won''t work
2005 Jun 30
2
Find by ID plus conditions -> ActiveRecord::RecordNotFound
Hi I''m trying to understand the AR find facilities, described here: http://api.rubyonrails.com/classes/ActiveRecord/Base.html#M000650 I have a list of ids that I want to retrieve, but have a condition that should restrict the list returned: return self.find( noteids, :conditions => [ "(private = 0 OR (private = 1 AND user_id = ?))", userid] ) According to the
2006 Apr 08
4
Calling validates_inclusion_of out of default namespace
Hi, I''m trying to run the "validates_inclusion_of" method in a before_save hook, because the range is dependant on the related data. But I can''t figure out how to call it. When calling it normally, it says it can''t find it. I''ve tried several combinations like "ActiveRecord::Validations.validates_inclusion_of", but I can''t seem to
2006 Jan 24
3
AJAX Preview & Edit Page Problem
I''m new to RoR and have started building my first application. I''m building an account sign-up controller and I have two questions: 1. What is the best way to pass form params between methods in my sign-up controller? The solution I''m using seems too hacky and there''s got to be a something more elegant. I''m instantiating User.new to capture the
2007 Oct 03
4
form_remote_tag :onsubmit not working.
Hi, Has anyone successfully implemented the :onsubmit option for form_remote_tag. It doesn''t seem to work for me. Is there any specific version of rails which is required for the same. Here''s my piece of code. <script> function set_tojid(){ alert(''onsubmit''); } </script> <%= form_remote_tag :update => '''', :url => {
2006 Mar 21
4
Using onSubmit tag in form_tag?
Hi guys, I have been working on a form that would use javascript to validate the data before submitting it, and from my view.rhtml I have a statement like this: However such a statement generates a HTML tag that looks like this: <form action="/users/Login?onSubmit=validate%28%29" method="post"> Seems like Rails thinks it is a parameter instead of an option, so
2009 Mar 10
5
onsubmit for remote_form_for not working properly
I want to use onsubmit for a form validation using javascript on remote_form_for for this i am doing something like this <% remote_form_for :timesheet, @timesheet, :url =>{:action => ''report_user''}, :html => {:onsubmit=>"return ValidateDate();" } do |f| %> // Form elements here <% end %> but it not works well. if condition return false
2007 Feb 07
2
form_for onsubmit
Is there a reason I can''t find any information on using the onsubmit attribute with form_for? I''d hate to *gasp* hardcode the form tag in. chad --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to
2006 Feb 03
1
nested has_many associations
My question is whether the rails helper methods for handling associations can be nested (see examples below). I suspect not as currently I''m getting "unknown method" if I try and use two associations in one call. The essence of the code is class User << ActiveRecord::Base has_many :items class Items << ActiveRecord::Base has_many :reservations belongs_to
2005 Dec 15
3
define_method with parameters
Hi, I''m trying to write a macro which defines methods. One of these should have a parameter, but I can''t get that to work. Something like: define_method("printstuff") do puts "blabla" end works fine. But, how do I use define_method to create something like: def printstuff(the_stuff) puts the_stuff end Thanks in advance.
2007 May 09
1
How can I change a form's onsubmit event handler using rjs?
Hi all, I have a ajax form creating by "form_remote_for", whose url is to create a new model by default. The page doesn''t change after the ajax call on submit button so the form is still there after the new model is created. But if I submit the form for the second time, I want to update the formerly created model using an Ajax post. I think I could render an rjs at the end of
2006 Feb 16
4
newbie question regarding basic AJAX form verification
Hi, I''m confused about how form verification with AJAX works. Let''s say I have a ''new.rhtml'' view that contains a form with two fields, and the form action is ''create''. Let''s assume that I also want to do some type of data validation on one of the two fields via AJAX before I submit the form. But since I''ve already