search for: theform

Displaying 5 results from an estimated 5 matches for "theform".

2007 May 13
2
prototype - get inputs()
hi, i have the following function which is not working for me: function uploadimg (theform,ajaxAction,ajaxTarget){ var imgDesc = theform.getInputs(''page1'', ''text'',''imgDesc''); alert(imgDesc[0]); defaultAction=theform.action; defaultTarget=theform.target; theform.action=ajaxAction; theform.target=ajaxTarget; theform.submit();...
2006 Feb 05
1
Check/uncheck all checkboxes
Hello! I have this page where I list all users in a table. There is checkbox in every row. My User-model has a "checked"-attribute. I have implemented the checkboxes like this: <%= check_box("user[]", "checked") %> Which outputs this: <input id="user_12_checked" name="user[12][checked]" type="checkbox" value="1"
2005 Dec 10
1
submit ajax form through javascript
...failure:''command_div'' }, ''/windows/chat_post'', { asynchronous:true, parameters:Form.serialize(this } ); return false; this works fine when I submit the form by pressing the submit button. But when I submit the form with a javascript theform.submit() command, the onsubmit function does not get evaluated and the browser simply loads the form action url. So: How can I setup my form so that on the submit() command the browser calls my onsubmit function and not load the form action? Calling the onsubmit function directly would be an answ...
2008 Aug 27
5
VALIDATION QUESTION
I''m trying to validate a record before save. I''m using one controller in this case furnii where I have all my calls. The problem is that, the form containing the field I''m trying to validate resides in the furnii views. I tried to add validates_presence_of :content (the field name) in both the furnii model and the ratecomment model but it does not work. I know there
2007 Feb 25
5
Dynamically uploading a list that's already in a form
I have the classic case of: Posts, and Categories. When the user submits a post, he has a drop-down list of categories. I want to put a "Add category" link next to the list of categories. This is already inside a form, so a "link_to_remote" that creates a small AJAX form inside the "submit post" form will not work because that will mean to embed a form in another