Displaying 20 results from an estimated 30000 matches similar to: "ajax based form - render action breaks form"
2008 May 05
7
extract and assign xml values to variable
hi,
how can we assign an xml element value to some variable in
controller? e.g. if we have
<order>
<id>1</id>
<name>abc</name>
<location>xyz</location>
</order>
and if we want value of name i.e. ''abc'' to be assigned in a variable
declared in a controller, say order_controller, like this- temp = "value
of xml element
2006 Jul 24
0
Ajax page.replace_html model validation render partial errors
Hi; I have the following setup:
A model: that validates using helpers like: validates_presence_of, etc..
A view: called ''new'' which renders a partial
The partial: _form which has error_messages_for and a
form_remote_tag , submit_tag and end_form_tag
An action ''create'': that gets executed via the submit_tag in the
_form and which
in case it can''t
2006 Jan 26
2
link_to_remote > in :action , interrupt ajax to render a new page outside the :update div ?
Hello,
I have a simple link_to_remote that refresh a div. I just want to know
if it''s possible to interrupt the div''s refresh inside :action to
perform a complete reload of the page, outside of the div
Actually, I havea a new page, but loaded inside the ":update" div.
Someone have an idea please ?
the rhtml:
****
link_to_remote "yeah" , :update =>
2006 Jan 18
5
NOOB Ajax question: handling form input
Hi,
I was trying to modify how a standard edit form works so I could use Ajax to
truncate a zip code field which became too long as the user is entering the
value. The form was generated by the generate scaffold script. The form is
filled with default data taken from the current record. I coded the
following changes to a field in the _form.rhtml file:
<%= text_field
2006 Jan 13
0
AJAX and select form help
Hi all,
Trying a different approach here. I''ve got a select box on the _form.rhtml
(for ''new'') like so:
<%= select(:schedule, :start_date, @dates) %>
When that date changes, I need it to pass the selected value to the get_dates
controller function (of the Schedule class), that looks like so:
def get_slots(date)
@slots = Schedule.get_available_slots(date)
2005 Oct 14
0
Adding extra field in form using ajax causes extra field to be overwritten, any way around that.
I''m having trouble when I try to add another field in the form using ajax.
I''m trying to add another line_item object into the invoice and i''m using
the link_to_remote function to implement this. When I do that though and
submit to the form, the line_item entries all have the same field name so
they get overwritten. I''m not sure how to get around that.
Here is
2007 May 08
3
user and password verification (login form)
hello
I have created a registration form, from where the user is asked to fill
the userid and password and is stored in the database
now i want to create a login page which will take the user and password
and then verify with the database and if true then page 1 will open if
false page 2 will open.
can ne one tell me the code for it
thanks..
--
Posted via http://www.ruby-forum.com/.
2006 Jan 08
2
RoR AJAX select box update?
Hi,
I want to update a select box depending on another selected option thru
ajax.
Heres how I do it
# _form.rhtml
<select id="budget_coordinator_id" name="budget[coordinator_id]"
onchange="<%= remote_function(:update => "budget_project_number", :url
=> { :action => :get_projects }) %>">
<%=
2006 Jul 08
3
Make AJAX form do multiple actions?
I have a form that I want to do a few things.
-do an Effect.SlideOut on a div
-replace the text in a div with different text
-update the database and add a new div later in the document.
How do call all of these (there is only one :complete or :update)
Thanks in advance.
--
Posted via http://www.ruby-forum.com/.
2006 Aug 29
1
Scope problem with form_remote_tag, ajax?
Hi all,
I have tracked an odd behavior down to what I think is an issue of
scope. In short, when I use form_remote_tag to establish an AJAX form,
my database fields don''t get populated when performing an edit on the
record. Those same fields will get populated using start_form_tag and
no AJAX. I think that Ruby can''t find the local object that represents
the database
2006 Mar 10
4
Problem with ajax and textareas on firefox but works on IE
Hi folks,
I''ve been trying to figure this one out for a few hours now and can''t
seem to understand what I might be doing wrong here. Basically, I have
a textarea which has a little icon next to it which will fire off a
reset of the original comment if pressed. It works under IE so that
when the user types some garbase in to the textarea, and clicks the
icon, the contents
2006 Jul 21
0
Ajax page.replace_html model validation errors
I have the following setup:
A model: that validates using helpers like: validates_presence_of, etc..
A view: called ''new'' which renders a partial
The partial: _form which has error_messages_for and a
form_remote_tag , submit_tag and end_form_tag
An action ''create'': that gets executed via the submit_tag in the
_form and which
in case it can''t
2006 Jul 26
3
Getting Ajax.Updater or page.replace_html to render js?
Hey guys,
I, for the life of me, cannot figure out how to get Ajax.Updater or
page.repalce_html to render the javascript in a partial. Upon page
loading, the partial gets rendered fine. But when called up to render
through an AJAX function something goes wrong.
Are you guys getting this error???
--
Posted via http://www.ruby-forum.com/.
2006 Apr 19
1
render() call that does AJAX request?
All,
I have a page where I was using link_to_remote to do an AJAX call to
dynamically update another part of the page.
I''d like to just do the update no matter what (e.g. take out the need
for the user to click).
So I''m thinking that I need to render, but I want my render to do an
AJAX request to the same controller method that my link_to_remote did.
How can I achieve
2006 Feb 28
2
AJAX: do render but show element in same click?
I''m a rails newbie.
I''ve got a link_to_remote that puts a partial render into a div
("note1", "note2", etc.). As part of the display that comes up, I put
in a hide note link (element.toggle). Click that, the div goes away,
everything''s great... except now I can''t get it back.
How can I call the remote AND make the div show at the same
2006 Jan 05
0
render :partial, accentuated characters and Ajax preview
Hi all,
I added a textile preview Ajax - 1 - button to an edit page, and
accentuated characters now show up corrupted (but only in the preview
area)
As
- they are displayed correctly in the rest of the page,
- they are still correct when they reach the ''preview'' controller
, I guess "render :partial" is the culprit.
Is there a way to tell render how to render
2006 Mar 20
4
Ajax.Request w/standard redirect doesn''t render
I am doing an Ajax call in my page to a controller method like so:
new Ajax.Request(''<%= url_for(:action => "target_list_add" )%>'', {
asynchronous:true });"
In my controller method "target_list_add", I do something and then I
say:
redirect_to( :action => ''target_list_upload'', :layout => false )
I know for certain
2006 Jan 26
1
Action variables not available in views with Ajax
The title pretty much describes my problem.
I have a standard Ajax call to an action the updates a portion of my view.
However, variables set inside the action are not available in my view. In
fact, NOTHING that happens in my action seems to affect my view. Calling
render :layout => false still gives me the flipping layout.
However, I know the Ajax call itself is working because I can do
2006 May 02
1
Newbie problem with Ajax and render partial
Hi all,
I''m having this problem that I''m sure will take most of you all but two
seconds to solve, but I''m very much a newbie. I read the documentation,
googled for an answer, to no avail.
I have simple page that lists items, each item as a row in a table. Each
item has a rating and a link to increment/decrement rating. When using
+/- on a rating on the first item,
2007 Apr 19
1
How to redirect to other action when it is called using ajax
Hi all,
I am using javascript to call an action with some parameters. In that
action i decide on the basis of parameters either to render some text on
that page or to re direct to some other page. But its seems that my
redirect_to method is not working from that action. Can anybody tell me
some way of redirecting to some other action when that action is
called as a remote_function from