I'm using WWW::Mechanize for this. I can log in through the first page of this site, and follow a link to get to the page described above. Then I've tried selecting the two first single selects (after selecting the form they're inside by name), but that doesn't seem to work. The responses I get still have an unpopulated last drop down select control.

Luckily changing those first two selects brings you to a different URL. So I've also tried just $browser->get()ting that URL and then trying to select and submit/click from the 3rd drop down select menu. Then I've tried following the link to the data through the follow_link function, but this just brings me back to the same page, with a "#" tacked onto the URL given. I've also tried just getting the URL for the data page directly after selecting from the third drop down menu, but that gives me a page with an empty data table that isn't empty when accessed properly through the browser.

Below are some snippets from the HTML of the page I'm working with and the key lines from the code I'm trying to get to work.

Finally, here's some of my code. This comes after I've already logged in and followed a link the page where the HTML above comes from.

$br->get('http://.../sipp.php?thn=2008&kdprop=01');
# $br is initialized from mechanize: my $br = WWW::Mechanize->new();
# Set ->agent_alias('Windows IE 6');
my $resp = $br->content();
$resp =~ s/\x0D//g; # On a mac here, get ^M at the end of each line
my @pt_vals = get_proyektemp_values($resp);
#Don't want to use mech-dump, so just regexing the newly populated val+ues of the 3rd drop down menu
$br->form_name('sipp');
$br->field('proyektemp', "$pt_vals[1]");
$br->submit();

P1 just brings me back to the same page I started on. 2 gets me to the data table page, but with an (incorrectly) empty table. Am I just being a newbie web programmer idiot? Is this a Javascript problem? Are these select controls and links all calling javascript functions, which aren't interpreted in Mechanize? Are there other libraries that would scrape this page successfully? I've also tried the Python version of Mechanize, but had no success there either.

This stuff here:
onChange="enableIt(this,document.sipp.proyektemp); gatherInfoProp(document.sipp.fiscal, this, 'thn=','&kdprop='); getName(this,document.sipp.nmpropinsi); is JS which runs three different functions when something is selected in those menus.

So, figure out what's actually happening, is the usual advice.

My preferred way to do this is to use the Live HTTP Headers Add-on for Firefox. No matter what the Javascript does, sooner or later, the browser retrieves a page, from a URL, via HTTP, and once you can figure out what that URL is, you'll be able to write your script.

Nobody says perl looks like line-noise any more
kids today don't know what line-noise IS ...

Thanks guys. HTTP::Recorder looks very cool and useful, but it doesn't deal with Javascript either. It just pumps out the code that I'd already tried.

So I tried Live HTTP with firefox. Oh man. I'm not super well versed in this stuff. I've just attached my Live HTTP output below. The only thing I've been able to think to try is to get the ../sipp2005/form_A3.php page "manually" by adding the the ses_id line to the full form_A3 URL after a ?, both with the +'s and with them replace by %20, since they appear as spaces in the page itself. That doesn't work even in my browser, already logged in to the site. Any help is GREATLY appreciated...

There's stuff before this, but none of it, like the login, is javascript dependent, so I can get there fine. I can get to the http://sipp.pu.go.id/sipp/sipp.php?thn=2008&kdprop=01 site just by putting those URLs in after logging (through Mechanize). The thn and kdprop values come from two drop down select controls that use javascript so I can't use them properly but just getting the URL works fine. There's statcounter.com HTTP content after the top one below, but I've deleted that. The second Post is what I need and can't get to work...

um, http::recorder is easier than live/headers.
you use a browser to do what you want (js or no),
and http::recorder records the conversation,
which you duplicate using mechanize.
Otherwise
there really is no way without learning http/cgi....