search for: form_act

Displaying 3 results from an estimated 3 matches for "form_act".

Did you mean: forfact
2005 Dec 13
2
Ajax.Request onComplete
...pe = { initialize: *function*(form_id, rendered_id) { this.form_id = form_id; *var* edit_form = $(form_id); *var* rendered_node = $(rendered_id); *if* (!edit_form || !rendered_node) { this.enabled = *false*; } *else* { *// getting the action value* this.form_action = edit_form.action; this.edit_form = edit_form; this.rendered_node = rendered_node; this.enabled = *true*; } }, sendForm: *function*() { *// let''s serialize the content of the form* *// and send it to the server* *var* myAjax = *new* Ajax.Request(t...
2006 May 29
3
IFRAME based RJS - responds_to_parent
...sponds_to_parent to your controller to respond to the parent document of your page. Make Ajaxy file uploads by posting the form to a hidden iframe, and respond with RJS to the parent window. Example ======= Controller: class Test < ActionController::Base def main end def form_action # Do stuff with params[:uploaded_file] responds_to_parent do render :update do |page| page << "alert($(''stuff'').innerHTML)" end end end end main.rhtml: <html> <body> <div i...
2007 Oct 24
3
Using Mechanize in Story Step Implementations
Hi, Thought this might be of interest story writers. The mechanize plugin seems to play nice with RSpec. The following mix of methods seems to work just fine. I especially like the helpers for populating forms. agent = WWW::Mechanize.new page = agent.get ''http://www.gmail.com'' page.should have_tag(''form'', :count => 1) form = page.forms.first form.email =