similar to: Using onSubmit tag in form_tag?

Displaying 20 results from an estimated 1000 matches similar to: "Using onSubmit tag in form_tag?"

2005 Sep 13
6
form_tag & form_remote_tag html id attribute
Hello, Is there a way to set the html element id for the form_tag and form_remote_tag on the server side? I want to have this resultant html... <form id=''something'' ... ... </form> Thank you, Brian Takita
2006 Mar 23
2
newbie - form_tag with get?
I can''t create a form with method "get". The rhtml code: <%= form_tag :controller => ''teritory'', :action => ''add'', :method => ''get'' %> The generated html code: <form action="/teritory/add?method=get" method="post"> What i''m doing wrong? -- They say money can''t
2006 Mar 21
13
"Remembering" link to redirect to after logging in
Hi, Suppose I have a resource such as http://localhost:3000/topsecret/data that requires the user to login first. What I did was make use of before_filter to check and see if the session variable is set with the logged in user''s id (similar to the example in "Agile Web Development with Rails"). However while the filtering function does work correctly in redirecting the
2006 Jan 13
5
Form field naming semantics question
Hi, I have a question today regarding how the various form elements in _form.rhtml are named. I understand that for a database table "persons" with a column headed by "name", then in _form.rhtml it will probably be like: <p><label for="person_name">Name><br/> <%= text_field ''person'', ''name''
2006 Jul 09
4
Search terms in URL
I have set up a ferret search using the examples in the demo app. Is it possible to have the search terms included in the URL, so that, for example, users can bookmark a search results page ? Chris -- Posted via http://www.ruby-forum.com/.
2006 Feb 26
1
Help with ruby=>html
Hi! I''m new to ruby and rails and got problems with using basic methods like form_tag or link_to etc to create what i need, i.e. to specify css class or id or name of html elements. I have problem with understanding rails api (it''s just as an example): form_tag(url_for_options = {}, options = {}, *parameters_for_url) what parameters can i pass to form_tag? How to specify
2006 Jan 17
2
Instant Rails request lags >4 sec
Hello RoR folks, I am using Instant Rails and a small app that currently uses scaffolding for CRUD on just one table with 7 attributes. I am not shure wether scaffolding slows down the app that much but I have a time lag for every request with above 4 sec. The preinstalled apps like Type are running damn fast, which is not the case for my stuff. Any help on this would be great Thanks, RTG --
2006 May 09
2
[Prototype] Why doesn''t calling submit() on a form result in the execution of the onsubmit event handler?
Hi, Is it normal that a call to $(''some_form'').submit() doesn''t result in the execution of an onsubmit event handler on ''some_form''? Thanks, - Rowan -- Morality is usually taught by the immoral. -------------- next part -------------- An HTML attachment was scrubbed... URL:
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 => {
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
2007 Apr 22
1
form_tag using :onsubmit => "confirm('are you sure?')". help
hi, both ok and cancel buttons submits the form....is there a way that when the user selects cancel that it doesnt submit the form? thanks! -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 Mar 23
1
Implementing a model with logging?
Hi, I''ve been trying to work out a model (let''s say a StudentRecord) which has a number of attributes, and the key thing I''m trying to do here is to implement it such that you can actually view modifications made over time by various users (think of it as a wikipedia style of logging). Is there some provision in rails that''d provide this functionality for
2006 Mar 24
1
Modifying a session variable from a different process?
Hi, I''ve implemented a log in session "thing" that essentially works by holding the model of the logged in user in a session variable, like this: session[:user] = user However let''s say at this point in time, should an administrator of the system decide to revoke this user''s account, the session variable for that currently logged in user is still valid,
2006 Jan 12
1
Does rails support method overloading?
I''ve tried to have 2 methods of the same name (but with different parameter signatures) and it always seems like the later declaration tends to win out, does this mean that ruby does not support overloading? If so what aboutt the .new method? You can either call it as .new (with nothing) or .new(hash variable). Is it possible to override a specific instance of the zero parameter
2006 Jan 14
2
Why can''t I changed the _session_id cookie?
Hi, I noticed that there is a cookie set by my rails scaffold that contains a 32 character hash code in it, but when I tried to change its value using Cookies[:_session_id], nothing happened, it stays the same! How am I supposed to change the session_id? Thanks. -- Posted via http://www.ruby-forum.com/.
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 04
1
Error when using form helper and child objects
Hi, This is one problem that has gotten me stumped for quite a while. I have an Item that has_many :DeliveryMethod, and what I seek to achieve is to create a form that''d let me create an Item, as well as its DeliveryMethods in 1 single form. And so I tried something like: <%= text_field_tag ''Item[DeliveryMethod][price]'', @Item.DeliveryMethod ?
2006 Apr 10
3
form_remote_tag : additional onsubmit funct. possible ?
Is there a way to add onsubmit functionality to a form_remote_tag with an additional javascript directive? eg I''d like for an inline javascript to make the form''s div container hidden as soon as the button is pressed to avoid having it possibly get pressed again ( sometimes the rails response is slow enough for a user to think they need to re-press it ). example: <div
2006 Nov 23
3
Prototype Safari onSubmit Issues
Hi folks. Another Prototype question. I have a simple ajax form which I want to return results on an onChange. Works in IE6 (Win) and FF, but Safari doesn''t seem to take the onChange too well. Upon the return key, it blanks out the form. Upon tabbing to the next field (actually the next form), I get the results. <form name="form1" id="form1"