in reply to Re^4: problem regarding the value given in the select box
in thread problem regarding the value given in the select box

Please only post the relevant part of the HTML instead of pasting the complete page.

Also, please post the exact error message instead of some vague reinterpretation of the error message. Perl does not output the following error message:

can't call method on an undefined value

All error messages of this kind look like

Can't call method "some_method" on an undefined value at -e line 1.

Being more exact with your code and data helps us to help you better, so please put some effort in reporting the exact output instead of leaving out the important details.

Replies are listed 'Best First'.
Re^6: problem regarding the value given in the select box
by rashichauhan (Novice) on Sep 14, 2013 at 09:55 UTC
    <form id="form" action="printChokePoints.php" method="POST" enctype="multipart/form-data"> <script> // The blockUI function doesn't work on IE8 with frames ! We have to // block div $('form').block({ css: { border: 'none', padding: '15px', backgroundColor: '#000', '-webkit-border-radius': '10px', '-moz-border-radius': '10px', opacity: .5, color: '#fff' } }); $(document).ready(function() { $('form').unblock(); }); </script> Select a biosource <select name='org' size=1 onChange='javascript:changeOrg(this.value)'> <option value=''>Select a biosource</option> <option style="color:black;" value=884 >Bacillus anthracis (Strain: Ames Ancestor) MicroCyc</option> <option style="color:black;" value=885 >Bacillus subtilis (Strain: 168) MicroCyc</option> My perl code os
    $url = "http://metexplore.toulouse.inra.fr/metexplore/index.php/2011-0 +6-06-14-41- 10/choke-point-reactions"; my $mech=WWW::Mechanize->new(); $mech->get($url); $value ="Bacillus anthracis (Strain: Ames Ancestor) MicroCyc"; #$mech->form_id('form'); $mech->field('org',$value); #$mech->select('org', '?Bacillus anthracis(Strain:Ames Ancestor)MicroC +yc'); $mech->set_fields('org'=>$value); $mech->submit;
    but the error is coming "Can't call method "some_method" on an undefined value at -e line 1407."

      This cannot be the error message you are seeing.

      The script you show does not have 1407 lines. There is no method named "some_method" mentioned in the code you show.

      Please find a colleague near to you and ask them about how to proceed with your problem.

      I cannot help you further unless you show actual effort.

        This 1407 line is in mechanize.pm the complete error is "can't call method on an undefined value at C:/strawberry/perl/vendor/lib/www/mechanize.pm. some_methods was wrongly typed.Plz help me in this regard!!