From: Robert Molloy Date: 2010-03-26T07:58:18+09:00 Subject: Request Error Submitting CGI Form Hi guys, I'm trying to submit a form to the following website (http://www.tse.or.jp/tseHpFront/HPLCDS0101E.do) and just want to print out the result. Here's the code that I'm using. require 'rubygems' require 'mechanize' agent = Mechanize.new page = agent.get('http://www.tse.or.jp/tseHpFront/HPLCDS0101E.do') search_form = page.form('HPLCDS0101Form') search_form.callJorEFlg = 1 search_form.exeKind = 'HPLCDS0101E' search_form.searchListCount = 200 search_form.checkbox_with(:value => '001').check search_form.checkbox_with(:value => '002').check search_form.checkbox_with(:value => '004').check page = agent.submit(search_form) pp page Unfortunately, I'm getting the following error in the request. C:/Ruby/lib/ruby/gems/1.8/gems/mechanize-1.0.0/lib/mechanize.rb:464:in `post_for m': 500 => Net::HTTPInternalServerError (Mechanize::ResponseCodeError) from C:/Ruby/lib/ruby/gems/1.8/gems/mechanize-1.0.0/lib/mechanize.rb:370 :in `submit' from tester.txt:15 It looks like I'm missing some parameter in the request object. Can anyone suggest what I need to do to make my request work? Excuse me if I'm doing something wrong, I'm new to this. Thanks! -- Posted via http://www.ruby-forum.com/.