I am trying to manipulate the form at this link
The code uses JS to populate the options for the next element based on the current element. While I have been able to select the element for district I am not able to trigger the script to load the next element. Any pointers on what I am doing wrong.
use strict; use WWW::Mechanize::Firefox; my $mech = WWW::Mechanize::Firefox->new(); $mech->get('http://117.247.176.82/VIEWDOCS.aspx'); $mech->autoclose_tab( 0 ); $mech->allow( javascript => 1 ); my @el = $mech->by_id('MainContent_ddldist'); $el[0]->__event('mousedown'); $mech->select( 'ctl00$MainContent$ddldist'=>'BN'); $el[0]->__event('mouseup'); #Well the mouse event did not work, lets trigger on change directly. $el[0]->__event('onChange'); my @el=$mech->by_id('ctl01'); $el[0]->__event('click'); #even this did not work and I have spent over a day on this... time to + seek the wisdom of the monks?. sleep 10
In reply to WWW::Mechanize::Firefox trigger onchange event by vijayvithal
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |