search for: editform

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

Did you mean: edit_form
2007 May 12
3
Setting form-values
...) agent = WWW::Mechanize.new agent.user_agent = ''Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)'' page = agent.get(''http://en.wikipedia.org/w/index.php?title='' + pagename + ''&action=edit'') form = page.forms.with.name("editform").first form.wpTextbox1 = content form.wpSummary = editsummary page = agent.submit form end save(''User:Tim.bounceback/testing'', ''bleh'') Yields the following error message: bleh.rb:8:in `save'': undefined method `wpTextbox1='' for...
2006 Aug 04
4
DRY DRY DRY
...class.find :all, :limit => ITEMS_PER_PAGE, :offset => ITEMS_PER_PAGE * (@sess[:page] - 1) @pages = Paginator.new self, model_class.count, ITEMS_PER_PAGE, @sess[:page] render ''shared/list'' end def new @item = model_class.new #@editform = model_class.editform render ''shared/new'' end def edit @item = model_class.find(params[:id]) #@editform = model_class.editform render ''shared/edit'' end def create @item = model_class.new(params[:edit]) if @item.save #flash[:...
2006 Oct 11
2
Mechanize: save and cancel doesn''t work in JSPWiki
...el doesn''t work either. I don''t get any errors. There is no JavaScript used to submit the form. After I''m logged in I do the following: def save(page, content) @agent.get(@base_url + "Edit.jsp?page=#{page}") form = @agent.page.forms.with.name(''editForm'') form.fields.name(''_editedtext'').value = content form.submit(form.buttons.first) end And this is the cancel method (the @agent already got the edit page) def cancel form = @agent.page.forms.with.name(''editForm'') form.submit(form.button...