Displaying 3 results from an estimated 3 matches for "ajaxcontrol".
2006 Mar 16
2
question about ajax/rjs and redirection
...tted to the backend via
AJAX. if there is a validation error in the form, i handle that on the AJAX
side. however, if the form validates, I''d like to redirect the browser to a
different page. Will a redirect_to work with an AJAX call or do I have to
handle that a special way?
ie
class AjaxController < ApplicationController::Base
def do_something
#validate the form data
redirect_to :controller => "xyz", :action => "abc" and return if
data.validated?
# otherwise, render the rjs template
end
end
-------------- next part --------------
An HTML attac...
2005 Dec 23
0
adding items to a particular invoice on the same page
...quot; id="invoice_inv_number" name="invoice[inv_number]" >
<li>Original item... please add more!</li>
</ul>
<%= submit_tag ''Update'' %>
</form>
</body>
</html>
Controller Ajax_controller.rb
lass AjaxController < ApplicationController
def index
$counter =1
$count = 0
end
def add_new_item
render(:partial => ''invoiceitems'', :collection => @invoiceitems )
end
def save_items
# render_text params[:invoiceitem]
# render_text params[:invoice]
@invoic...
2006 Jan 03
45
Status of Prototype
Hi *,
we are using prototype in Apache MyFaces as our javascript library of
choice. Recently, there has been much discussion on our mailing list
as to the usability of prototype in a dynamic environments where
several javascript libraries are used.
The critics of prototype argue that the prototype objects are not
namespaced - and that prototype extends basic javascript-objects with
method names